mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
fix NULL deref in mbstring post handler
This commit is contained in:
parent
c1f893d894
commit
2283551cfa
@ -377,8 +377,10 @@ SAPI_POST_HANDLER_FUNC(php_mb_post_handler)
|
||||
|
||||
php_stream_rewind(SG(request_info).request_body);
|
||||
post_data_str = php_stream_copy_to_mem(SG(request_info).request_body, PHP_STREAM_COPY_ALL, 0);
|
||||
detected = _php_mb_encoding_handler_ex(&info, arg, ZSTR_VAL(post_data_str));
|
||||
zend_string_release(post_data_str);
|
||||
detected = _php_mb_encoding_handler_ex(&info, arg, post_data_str ? ZSTR_VAL(post_data_str) : NULL);
|
||||
if (post_data_str) {
|
||||
zend_string_release(post_data_str);
|
||||
}
|
||||
|
||||
MBSTRG(http_input_identify) = detected;
|
||||
if (detected) {
|
||||
|
Loading…
Reference in New Issue
Block a user