diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-01-03 11:14:45 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-01-17 09:47:31 +0100 |
commit | 018251a7c492916a6fa2c0e9a5e7adaba14bd614 (patch) | |
tree | 8fc71c547256ac081768cf5859f24dcffe10611c | |
parent | 1752393bb4013ca94d45da5a4d43997a73ae9750 (diff) | |
download | php-git-018251a7c492916a6fa2c0e9a5e7adaba14bd614.tar.gz |
Fixed bug #71876
This is a backport of fcdc0a6db0ae63fbed9e3828137b899b844623ce
to the PHP-7.3 branch. We need to make sure that OnUpdateString
is also called for a NULL value, otherwise the reset of the encoding
at the end of the request will not work.
I believe I already tried to land this before once, but it didn't
actually end up on the PHP-7.3 branch due to a push conflict that
I only noticed just now.
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | main/main.c | 8 |
2 files changed, 8 insertions, 4 deletions
@@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 7.3.15 +- Core: + . Fixed bug #71876 (Memory corruption htmlspecialchars(): charset `*' not + supported). (Nikita) + - CURL: . Fixed bug #79078 (Hypothetical use-after-free in curl_multi_add_handle()). (cmb) diff --git a/main/main.c b/main/main.c index 6917fe3230..30629117d9 100644 --- a/main/main.c +++ b/main/main.c @@ -588,8 +588,8 @@ static PHP_INI_DISP(display_errors_mode) */ static PHP_INI_MH(OnUpdateDefaultCharset) { + OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); if (new_value) { - OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); #ifdef PHP_WIN32 php_win32_cp_do_update(ZSTR_VAL(new_value)); #endif @@ -602,8 +602,8 @@ static PHP_INI_MH(OnUpdateDefaultCharset) */ static PHP_INI_MH(OnUpdateInternalEncoding) { + OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); if (new_value) { - OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); #ifdef PHP_WIN32 php_win32_cp_do_update(ZSTR_VAL(new_value)); #endif @@ -616,8 +616,8 @@ static PHP_INI_MH(OnUpdateInternalEncoding) */ static PHP_INI_MH(OnUpdateInputEncoding) { + OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); if (new_value) { - OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); #ifdef PHP_WIN32 php_win32_cp_do_update(NULL); #endif @@ -630,8 +630,8 @@ static PHP_INI_MH(OnUpdateInputEncoding) */ static PHP_INI_MH(OnUpdateOutputEncoding) { + OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); if (new_value) { - OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); #ifdef PHP_WIN32 php_win32_cp_do_update(NULL); #endif |