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-03 11:14:45 +0100 |
commit | 1f9e93687c0ceb442ef608b894427ada11ac06fc (patch) | |
tree | 8f2815cad897f076697b2bcd8942d940cebe8e42 | |
parent | 0cecf83b264cbbb5683ab8a843cc4a4d9c294644 (diff) | |
download | php-git-1f9e93687c0ceb442ef608b894427ada11ac06fc.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.
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | main/main.c | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -5,6 +5,8 @@ PHP NEWS - Core . Fixed bug #78999 (Cycle leak when using function result as temporary). (Dmitry) + . Fixed bug #71876 (Memory corruption htmlspecialchars(): charset `*' not + supported). (Nikita) - CURL: . Implemented FR #77711 (CURLFile should support UNICODE filenames). (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 |