projects
/
infodrom
/
cgilib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02ba610
)
Don't trust Content-Length too much
author
Joey Schulze
<joey@infodrom.org>
Wed, 28 Nov 2007 13:59:22 +0000
(13:59 +0000)
committer
Joey Schulze
<joey@infodrom.org>
Wed, 28 Nov 2007 13:59:22 +0000
(13:59 +0000)
cgi.c
patch
|
blob
|
history
diff --git
a/cgi.c
b/cgi.c
index
61b4e1e
..
c87fa21
100644
(file)
--- a/
cgi.c
+++ b/
cgi.c
@@
-155,6
+155,8
@@
s_var **cgiReadVariables ()
if (cp && !strcmp(cp, "POST")) {
if (ip) {
length = atoi(ip);
+ if (length <= 0)
+ return NULL;
if ((line = (char *)malloc (length+2)) == NULL)
return NULL;
fgets(line, length+1, stdin);