diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2000-05-22 18:42:02 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2000-05-22 18:42:02 +0000 |
commit | 86a24e2c7f3973e756847ad71874ef8674732158 (patch) | |
tree | 750aa603c73193204bff2ed5b8cfe42a75fc122c /usr.bin/ssh/readconf.c | |
parent | 88efda90023aa7986f7bce3b1c831233240ce4ee (diff) |
check strtok() != NULL; ok niels@
Diffstat (limited to 'usr.bin/ssh/readconf.c')
-rw-r--r-- | usr.bin/ssh/readconf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index 2053c67aa2b..74570db316a 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$Id: readconf.c,v 1.31 2000/05/08 17:12:15 markus Exp $"); +RCSID("$Id: readconf.c,v 1.32 2000/05/22 18:42:01 markus Exp $"); #include "ssh.h" #include "cipher.h" @@ -464,6 +464,8 @@ parse_int: case oCipher: intptr = &options->cipher; cp = strtok(NULL, WHITESPACE); + if (!cp) + fatal("%.200s line %d: Missing argument.", filename, linenum); value = cipher_number(cp); if (value == -1) fatal("%.200s line %d: Bad cipher '%s'.", @@ -474,6 +476,8 @@ parse_int: case oCiphers: cp = strtok(NULL, WHITESPACE); + if (!cp) + fatal("%.200s line %d: Missing argument.", filename, linenum); if (!ciphers_valid(cp)) fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.", filename, linenum, cp ? cp : "<NONE>"); @@ -484,6 +488,8 @@ parse_int: case oProtocol: intptr = &options->protocol; cp = strtok(NULL, WHITESPACE); + if (!cp) + fatal("%.200s line %d: Missing argument.", filename, linenum); value = proto_spec(cp); if (value == SSH_PROTO_UNKNOWN) fatal("%.200s line %d: Bad protocol spec '%s'.", |