diff options
author | Nathan Angelacos <nangel@alpinelinux.org> | 2008-12-17 01:47:59 +0000 |
---|---|---|
committer | Nathan Angelacos <nangel@alpinelinux.org> | 2008-12-17 01:47:59 +0000 |
commit | 0983c810ea52902ccaa9948fe41369e13410338a (patch) | |
tree | 6ef54e8f5f253d0f9f9de14f70a826288e36ad07 | |
parent | 64b823303af9dcb002370d0611c5783a8c610442 (diff) | |
download | haserl-0983c810ea52902ccaa9948fe41369e13410338a.tar.bz2 haserl-0983c810ea52902ccaa9948fe41369e13410338a.tar.xz |
Err... the null content-length check didnt check
-rw-r--r-- | src/haserl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/haserl.c b/src/haserl.c index da7c755..4b7d2f2 100644 --- a/src/haserl.c +++ b/src/haserl.c @@ -470,7 +470,8 @@ ReadCGIPOSTValues (list_t * env) unsigned char *data; const char *CONTENT_LENGTH = "CONTENT_LENGTH"; - if (getenv (CONTENT_LENGTH) == NULL) + if ((getenv (CONTENT_LENGTH) == NULL) || + (strtoul (getenv(CONTENT_LENGTH), NULL, 10) == 0 )) return (0); if (getenv ("CONTENT_TYPE")) @@ -486,8 +487,7 @@ ReadCGIPOSTValues (list_t * env) s_buffer_init (&sbuf, 32768); sbuf.fh = STDIN; - if ((getenv (CONTENT_LENGTH)) || - (strtoul (getenv(CONTENT_LENGTH), NULL, 10) == 0 )) + if (getenv (CONTENT_LENGTH)) { sbuf.maxread = strtoul (getenv (CONTENT_LENGTH), NULL, 10); } |