summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartijn <martijn@openbsd.org>2016-03-22 11:21:02 +0000
committermartijn <martijn@openbsd.org>2016-03-22 11:21:02 +0000
commit6c09c89e7f88be1ad36e8523d088689fc09308bb (patch)
treecb495aa606ff652bddaf75deaa55f9ee03acb222
parentRemove support for ARM9E. This is another step in the plan to remove (diff)
downloadwireguard-openbsd-6c09c89e7f88be1ad36e8523d088689fc09308bb.tar.xz
wireguard-openbsd-6c09c89e7f88be1ad36e8523d088689fc09308bb.zip
Add NULL check
OK schwarze@
-rw-r--r--lib/libedit/eln.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libedit/eln.c b/lib/libedit/eln.c
index 08df55c5516..4801b08c946 100644
--- a/lib/libedit/eln.c
+++ b/lib/libedit/eln.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eln.c,v 1.12 2016/03/21 18:40:25 schwarze Exp $ */
+/* $OpenBSD: eln.c,v 1.13 2016/03/22 11:21:02 martijn Exp $ */
/* $NetBSD: eln.c,v 1.9 2010/11/04 13:53:12 christos Exp $ */
/*-
@@ -72,7 +72,8 @@ el_gets(EditLine *el, int *nread)
const wchar_t *tmp;
wchar_t *rd, *wr;
- tmp = el_wgets(el, nread);
+ if ((tmp = el_wgets(el, nread)) == NULL)
+ return NULL;
/*
* Temporary until the libedit audit is complete: