From 26f82a77061b7389c4507a2277643139339b430b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 2 Oct 2018 16:13:51 +0200 Subject: [PATCH] Fixed bug #76958 --- NEWS | 3 +++ ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c | 4 +++- ext/mbstring/tests/bug76958.phpt | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 ext/mbstring/tests/bug76958.phpt diff --git a/NEWS b/NEWS index 906b6a67e8..694e87930f 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ PHP NEWS . Fixed bug #72635 (Undefined class used by class constant in constexpr generates fatal error). (Nikita) +- Mbstring: + . Fixed bug #76958 (Broken UTF7-IMAP conversion). (Nikita) + 27 Sep 2018, PHP 7.3.0RC2 - CURL: diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c index 72c772b072..d95c5dbaa9 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7imap.c @@ -40,7 +40,9 @@ const mbfl_encoding mbfl_encoding_utf7imap = { NULL, NULL, NULL, - MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE, + &vtbl_utf7imap_wchar, + &vtbl_wchar_utf7imap }; const struct mbfl_convert_vtbl vtbl_utf7imap_wchar = { diff --git a/ext/mbstring/tests/bug76958.phpt b/ext/mbstring/tests/bug76958.phpt new file mode 100644 index 0000000000..a7d6112936 --- /dev/null +++ b/ext/mbstring/tests/bug76958.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #76958: Broken UTF7-IMAP conversion +--FILE-- + +--EXPECT-- +Рассылки +&BCAEMARBBEEESwQ7BDoEOA- -- 2.40.0