summaryrefslogtreecommitdiff
path: root/ext/iconv/iconv.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2018-08-25 17:42:10 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2018-08-25 17:47:29 +0200
commit314b8ecf8b07a8b87efeca5454e36a6b55ca4dd1 (patch)
treea0e818c2b3fbe323775239b700f4eb812643e48a /ext/iconv/iconv.c
parent7e176ddb57ec41751185e761ee19c42697e65543 (diff)
parente29c946c29afdb0bf89c5329fcf3038448d50e17 (diff)
downloadphp-git-314b8ecf8b07a8b87efeca5454e36a6b55ca4dd1.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Fix #60494: iconv_mime_decode does ignore special characters
Diffstat (limited to 'ext/iconv/iconv.c')
-rw-r--r--ext/iconv/iconv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index d60d2151d6..6e3202e6fa 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -1535,7 +1535,10 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
break;
default: /* first letter of a non-encoded word */
- _php_iconv_appendc(pretval, *p1, cd_pl);
+ err = _php_iconv_appendc(pretval, *p1, cd_pl);
+ if (err != PHP_ICONV_ERR_SUCCESS) {
+ goto out;
+ }
encoded_word = NULL;
if ((mode & PHP_ICONV_MIME_DECODE_STRICT)) {
scan_stat = 12;