r17873: Fix possible null deref found by Stanford checker.
authorJeremy Allison <jra@samba.org>
Mon, 28 Aug 2006 04:55:05 +0000 (04:55 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:56 +0000 (11:38 -0500)
Jeremy.
(This used to be commit 1adb3b2432187e9a19b78cfa5762c3e05a357392)

source3/web/cgi.c

index d289613b4ba52dad2f4131069d8dd495356148be..046dd3bee620033459cfc7beb9ad42cfc6463b98 100644 (file)
@@ -80,8 +80,9 @@ static char *grab_line(FILE *f, int *cl)
 
        }
        
-
-       ret[i] = 0;
+       if (ret) {
+               ret[i] = 0;
+       }
        return ret;
 }