summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/readconf.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2005-05-16 15:30:52 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2005-05-16 15:30:52 +0000
commit1bd78b238ddf44abbd06d87174e3960ac2ccedc2 (patch)
tree3ee19dff0f88a5a58e0cfe4a0cf75bd485d62674 /usr.bin/ssh/readconf.c
parent18d0f28f3d222a391f075cc8a7a2e5bbbf96e3f1 (diff)
check return value from strdelim() for NULL (AddressFamily); mpech
Diffstat (limited to 'usr.bin/ssh/readconf.c')
-rw-r--r--usr.bin/ssh/readconf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c
index 414d69c3668..ab7b2baf884 100644
--- a/usr.bin/ssh/readconf.c
+++ b/usr.bin/ssh/readconf.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: readconf.c,v 1.139 2005/03/10 22:01:05 deraadt Exp $");
+RCSID("$OpenBSD: readconf.c,v 1.140 2005/05/16 15:30:51 markus Exp $");
#include "ssh.h"
#include "xmalloc.h"
@@ -741,6 +741,9 @@ parse_int:
case oAddressFamily:
arg = strdelim(&s);
+ if (!arg || *arg == '\0')
+ fatal("%s line %d: missing address family.",
+ filename, linenum);
intptr = &options->address_family;
if (strcasecmp(arg, "inet") == 0)
value = AF_INET;