mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed segfault if empty POST
This commit is contained in:
parent
96e3fd4c1d
commit
21ccbbad7d
1 changed files with 2 additions and 4 deletions
|
@ -328,9 +328,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler)
|
||||||
smart_str_appendl(&post_data.str, buf, len);
|
smart_str_appendl(&post_data.str, buf, len);
|
||||||
|
|
||||||
if (SUCCESS != add_post_vars(arr, &post_data, 0 TSRMLS_CC)) {
|
if (SUCCESS != add_post_vars(arr, &post_data, 0 TSRMLS_CC)) {
|
||||||
if (post_data.str.s) {
|
smart_str_free(&post_data.str);
|
||||||
smart_str_free(&post_data.str);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -340,8 +338,8 @@ SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
add_post_vars(arr, &post_data, 1 TSRMLS_CC);
|
|
||||||
if (post_data.str.s) {
|
if (post_data.str.s) {
|
||||||
|
add_post_vars(arr, &post_data, 1 TSRMLS_CC);
|
||||||
smart_str_free(&post_data.str);
|
smart_str_free(&post_data.str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue