From 17b23d86577314547647aeda2a0e1205026f1769 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 26 May 2005 12:11:56 +1000 Subject: - markus@cvs.openbsd.org 2005/05/16 15:30:51 [readconf.c servconf.c] check return value from strdelim() for NULL (AddressFamily); mpech --- ChangeLog | 5 ++++- readconf.c | 5 ++++- servconf.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a84287c81..15d1a7490 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] @@ -2552,4 +2555,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3776 2005/05/26 02:11:28 djm Exp $ +$Id: ChangeLog,v 1.3777 2005/05/26 02:11:56 djm Exp $ diff --git a/readconf.c b/readconf.c index 8ace1bbd4..d41220807 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 96ad18084..ddb34f9b9 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 " -- cgit v1.2.3