summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/readconf.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2006-03-19 02:24:06 +0000
committerDamien Miller <djm@cvs.openbsd.org>2006-03-19 02:24:06 +0000
commit4cc27836a57fbda13281aa7986a92b1f641e3181 (patch)
tree988d2360310b5aa1212d355d042b80720e2be663 /usr.bin/ssh/readconf.c
parentcec517636d02b4dfff04a66d9ab20c655196987b (diff)
potential NULL pointer dereferences detected by Coverity
via elad AT netbsd.org; ok deraadt@
Diffstat (limited to 'usr.bin/ssh/readconf.c')
-rw-r--r--usr.bin/ssh/readconf.c5
1 files changed, 3 insertions, 2 deletions
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);