diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2000-07-09 01:27:34 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2000-07-09 01:27:34 +0000 |
commit | af3ae2f737b4f141d60f6ea206080a35d2395cc7 (patch) | |
tree | 81b8c3fad24921a76ed3743b57a76fbc01eb7ab1 /usr.bin/ssh/readconf.c | |
parent | 16b391ec6e5d6e1fb72516317e3ea30c35243f33 (diff) |
Better conditions for strsep() ending.
Diffstat (limited to 'usr.bin/ssh/readconf.c')
-rw-r--r-- | usr.bin/ssh/readconf.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index 290b296554c..c5f8a7be2f5 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: readconf.c,v 1.38 2000/07/08 23:17:31 provos Exp $"); +RCSID("$OpenBSD: readconf.c,v 1.39 2000/07/09 01:27:33 ho Exp $"); #include "ssh.h" #include "cipher.h" @@ -590,9 +590,11 @@ parse_int: } /* Check that there is no garbage at end of line. */ - if (strsep(&s, WHITESPACE) != NULL) - fatal("%.200s line %d: garbage at end of line.", - filename, linenum); + if ((arg = strsep(&s, WHITESPACE)) != NULL && *arg != '\0') + { + fatal("%.200s line %d: garbage at end of line; \"%.200s\".", + filename, linenum, arg); + } return 0; } |