diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-06 15:40:22 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-01-06 15:40:22 +0000 |
commit | d0570815af9e426b2b92568550e432df217d724b (patch) | |
tree | 9d5873e6b213df17227843f0034b97c1c9af72aa | |
parent | 6f44489b689a0362f30c6e2c2cfdd5c080afd80d (diff) | |
download | php-git-d0570815af9e426b2b92568550e432df217d724b.tar.gz |
Added more RFC2047-compliancy check in iconv_mime_decode()
-rw-r--r-- | ext/iconv/iconv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 5347ccbe96..acb1347a5f 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -1461,6 +1461,11 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st } } + if (scan_stat != 0) { + err = PHP_ICONV_ERR_MALFORMED; + goto out; + } + if (cd != (iconv_t)(-1)) { if ((err = _php_iconv_appendl(pretval, NULL, 0, cd)) != PHP_ICONV_ERR_SUCCESS) { goto out; |