Skip to content

Commit f80afa6

Browse files
author
Ilia Alshanetsky
committed
Fixed bug #40921 (php_default_post_reader crashes when post_max_size is exceeded).
1 parent 99c5ceb commit f80afa6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ PHP NEWS
3737
- Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
3838
- Fixed a thread safety issue in gd gif read code (Nuno, Roman Nemecek)
3939
- Fixed CVE-2007-1001, GD wbmp used with invalid image size (Pierre)
40+
- Fixed bug #40921 (php_default_post_reader crashes when post_max_size is
41+
exceeded). (trickie at gmail dot com, Ilia)
4042
- Fixed bug #40915 (addcslashes unexpected behavior with binary input). (Tony)
4143
- Fixed bug #40899 (memory leak when nesting list()). (Dmitry)
4244
- Fixed bug #40883 (mysql_query() is allocating memory incorrectly). (Tony)

main/php_content_types.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader)
4242

4343
/* $HTTP_RAW_POST_DATA registration */
4444
if(!strcmp(SG(request_info).request_method, "POST")) {
45-
if(NULL == SG(request_info).post_entry) {
45+
if(NULL == SG(request_info).post_entry && SG(request_info).post_data) {
4646
/* no post handler registered, so we just swallow the data */
4747
sapi_read_standard_form_data(TSRMLS_C);
4848
length = SG(request_info).post_data_length;

0 commit comments

Comments
 (0)