diff options
author | 2016-03-22 11:21:02 +0000 | |
---|---|---|
committer | 2016-03-22 11:21:02 +0000 | |
commit | 6c09c89e7f88be1ad36e8523d088689fc09308bb (patch) | |
tree | cb495aa606ff652bddaf75deaa55f9ee03acb222 | |
parent | Remove support for ARM9E. This is another step in the plan to remove (diff) | |
download | wireguard-openbsd-6c09c89e7f88be1ad36e8523d088689fc09308bb.tar.xz wireguard-openbsd-6c09c89e7f88be1ad36e8523d088689fc09308bb.zip |
Add NULL check
OK schwarze@
-rw-r--r-- | lib/libedit/eln.c | 5 |
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: |