summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-08-28 04:55:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:56 -0500
commit981588d57905674b1b13dc9830abf3e318d19ab3 (patch)
treefd5745f87370918cb96233fbfa0080bab81ab78e
parentb65eb11a2ec568c9caa0510918cefaad3fa22703 (diff)
downloadsamba-981588d57905674b1b13dc9830abf3e318d19ab3.tar.gz
samba-981588d57905674b1b13dc9830abf3e318d19ab3.tar.bz2
samba-981588d57905674b1b13dc9830abf3e318d19ab3.zip
r17873: Fix possible null deref found by Stanford checker.
Jeremy. (This used to be commit 1adb3b2432187e9a19b78cfa5762c3e05a357392)
-rw-r--r--source3/web/cgi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index d289613b4b..046dd3bee6 100644
--- a/source3/web/cgi.c
+++ b/source3/web/cgi.c
@@ -80,8 +80,9 @@ static char *grab_line(FILE *f, int *cl)
}
-
- ret[i] = 0;
+ if (ret) {
+ ret[i] = 0;
+ }
return ret;
}