diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-02-16 10:13:02 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-02-16 10:13:02 +0100 |
| commit | fd5a0b31640419ca63d1ddeaffd6d3cf2a741814 (patch) | |
| tree | bfd17d84c5181d7b98d7d66f56573f4fc897e31c /main/SAPI.c | |
| parent | 01fcdff3849c3691d9aaeaab735846ab6d8895ca (diff) | |
| download | php-upstream/5.3.5.tar.gz | |
Imported Upstream version 5.3.5upstream/5.3.5
Diffstat (limited to 'main/SAPI.c')
| -rw-r--r-- | main/SAPI.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index 1fd6ffd55..1681a4115 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: SAPI.c 296362 2010-03-18 22:37:25Z andrei $ */ +/* $Id: SAPI.c 305481 2010-11-18 04:09:02Z cataphract $ */ #include <ctype.h> #include <sys/stat.h> @@ -194,7 +194,7 @@ SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data) int read_bytes; int allocated_bytes=SAPI_POST_BLOCK_SIZE+1; - if (SG(request_info).content_length > SG(post_max_size)) { + if ((SG(post_max_size) > 0) && (SG(request_info).content_length > SG(post_max_size))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes", SG(request_info).content_length, SG(post_max_size)); return; @@ -207,7 +207,7 @@ SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data) break; } SG(read_post_bytes) += read_bytes; - if (SG(read_post_bytes) > SG(post_max_size)) { + if ((SG(post_max_size) > 0) && (SG(read_post_bytes) > SG(post_max_size))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Actual POST length does not match Content-Length, and exceeds %ld bytes", SG(post_max_size)); break; } |
