diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/dh.c | 5 | ||||
-rw-r--r-- | usr.bin/ssh/readconf.c | 5 | ||||
-rw-r--r-- | usr.bin/ssh/servconf.c | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/ssh/dh.c b/usr.bin/ssh/dh.c index 044d869fb88..8f8850b1953 100644 --- a/usr.bin/ssh/dh.c +++ b/usr.bin/ssh/dh.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: dh.c,v 1.31 2004/08/04 10:37:52 djm Exp $"); +RCSID("$OpenBSD: dh.c,v 1.32 2006/03/19 02:24:05 djm Exp $"); #include "xmalloc.h" @@ -46,7 +46,8 @@ parse_prime(int linenum, char *line, struct dhgroup *dhg) char *strsize, *gen, *prime; cp = line; - arg = strdelim(&cp); + if ((arg = strdelim(&cp)) == NULL) + return 0; /* Ignore leading whitespace */ if (*arg == '\0') arg = strdelim(&cp); diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index 56d7970ffc8..68f6d222c54 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.148 2006/02/22 00:04:44 stevesk Exp $"); +RCSID("$OpenBSD: readconf.c,v 1.149 2006/03/19 02:24:05 djm Exp $"); #include <sys/types.h> #include <sys/stat.h> @@ -323,7 +323,8 @@ process_config_line(Options *options, const char *host, s = line; /* Get the keyword. (Each line is supposed to begin with a keyword). */ - keyword = strdelim(&s); + if ((keyword = strdelim(&s)) == NULL) + return 0; /* Ignore leading whitespace. */ if (*keyword == '\0') keyword = strdelim(&s); diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 8ce43cca63f..112f095cbb7 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: servconf.c,v 1.146 2005/12/08 18:34:11 reyk Exp $"); +RCSID("$OpenBSD: servconf.c,v 1.147 2006/03/19 02:24:05 djm Exp $"); #include "ssh.h" #include "log.h" @@ -413,7 +413,8 @@ process_server_config_line(ServerOptions *options, char *line, u_int i; cp = line; - arg = strdelim(&cp); + if ((arg = strdelim(&cp)) != NULL) + return 0; /* Ignore leading whitespace */ if (*arg == '\0') arg = strdelim(&cp); |