From 38634ff69e03ef41a283cb0fc4142948559a70c7 Mon Sep 17 00:00:00 2001 From: djm Date: Thu, 26 May 2005 02:11:56 +0000 Subject: [PATCH] - markus@cvs.openbsd.org 2005/05/16 15:30:51 [readconf.c servconf.c] check return value from strdelim() for NULL (AddressFamily); mpech --- ChangeLog | 3 +++ readconf.c | 5 ++++- servconf.c | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4c5e7ad..83235006 100644 --- a/ChangeLog +++ b/ChangeLog @@ -53,6 +53,9 @@ - djm@cvs.openbsd.org 2005/05/10 10:30:43 [ssh.c] report real errors on fallback from ControlMaster=no to normal connect + - markus@cvs.openbsd.org 2005/05/16 15:30:51 + [readconf.c servconf.c] + check return value from strdelim() for NULL (AddressFamily); mpech 20050524 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] diff --git a/readconf.c b/readconf.c index 8ace1bbd..d4122080 100644 --- a/readconf.c +++ b/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" @@ -743,6 +743,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; diff --git a/servconf.c b/servconf.c index 96ad1808..ddb34f9b 100644 --- a/servconf.c +++ b/servconf.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: servconf.c,v 1.140 2005/03/10 22:01:05 deraadt Exp $"); +RCSID("$OpenBSD: servconf.c,v 1.141 2005/05/16 15:30:51 markus Exp $"); #include "ssh.h" #include "log.h" @@ -532,6 +532,9 @@ parse_time: case sAddressFamily: arg = strdelim(&cp); + if (!arg || *arg == '\0') + fatal("%s line %d: missing address family.", + filename, linenum); intptr = &options->address_family; if (options->listen_addrs != NULL) fatal("%s line %d: address family must be specified before " -- 2.45.2