]> andersk Git - openssh.git/commitdiff
- djm@cvs.openbsd.org 2006/03/19 02:24:05
authordjm <djm>
Sun, 26 Mar 2006 02:53:32 +0000 (02:53 +0000)
committerdjm <djm>
Sun, 26 Mar 2006 02:53:32 +0000 (02:53 +0000)
     [dh.c readconf.c servconf.c]
     potential NULL pointer dereferences detected by Coverity
     via elad AT netbsd.org; ok deraadt@

ChangeLog
dh.c
readconf.c
servconf.c

index 07a3600b5c0dc5d23f1837afe711f7213b3babfa..47e33db0df44ec4d680bdd83948412ce19ea7c98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      [hostfile.c]
      FILE* leak detected by Coverity via elad AT netbsd.org;
      ok deraadt@
+   - 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@
 
 20060325
  - OpenBSD CVS Sync
diff --git a/dh.c b/dh.c
index a30b704fbc319ecc254919b481beabf120bda90f..e8ce3d1a927074ad00910ce6b2c7f306139a7e5a 100644 (file)
--- a/dh.c
+++ b/dh.c
@@ -45,7 +45,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);
index 1112d0d86c18d4df71dbd2521e709a0ab8a7af4f..e2e10d9d6fbedd14ca87bbba7ba0841fe0d3eb82 100644 (file)
@@ -324,7 +324,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);
index 2ae93d4c3d290ca74e38aa72992b8c88bb3c5949..7923f5df4c985b7925538a2f7608765ede668040 100644 (file)
@@ -447,7 +447,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);
This page took 0.056379 seconds and 5 git commands to generate.