- djm@cvs.openbsd.org 2006/03/19 02:24:05
[dh.c readconf.c servconf.c]
potential NULL pointer dereferences detected by Coverity
via elad AT netbsd.org; ok deraadt@
diff --git a/readconf.c b/readconf.c
index 1112d0d..e2e10d9 100644
--- a/readconf.c
+++ b/readconf.c
@@ -324,7 +324,8 @@
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);