diff --git a/NEWS b/NEWS index 4071ddef406..964473c1a42 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,9 @@ PHP NEWS . Fixed JSON scanner and parser generation build. (Daniel Black, Jakub Zelenka) +- MBString: + . ext/mbstring: fix new_value length check. (Max Kellermann) + - Opcache: . Fix incorrect page_size check. (nielsdos) @@ -71,7 +74,7 @@ PHP NEWS - SAPI: . Fixed bug GHSA-54hq-v5wp-fqgv (DOS vulnerability when parsing multipart request body). (CVE-2023-0662) (Jakub Zelenka) - + 02 Feb 2023, PHP 8.1.15 - Apache: diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 40b8acc65fa..7a210cc347d 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -745,7 +745,7 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input) php_error_docref("ref.mbstring", E_DEPRECATED, "Use of mbstring.http_input is deprecated"); } - if (!new_value || !ZSTR_VAL(new_value)) { + if (!new_value || !ZSTR_LEN(new_value)) { const char *encoding = php_get_input_encoding(); MBSTRG(http_input_set) = 0; _php_mb_ini_mbstring_http_input_set(encoding, strlen(encoding));