summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2004-01-06 14:22:54 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2004-01-06 14:22:54 +0000
commit06232e481860ddb04367df809a9df3ccb6cdb234 (patch)
tree6aa61322546cda82ecc60e534b5a1c50eeca4cc1 /ext
parent10889a30843954c81653da41f5ba945531519ebd (diff)
downloadphp-git-06232e481860ddb04367df809a9df3ccb6cdb234.tar.gz
Prevent a character from being wrongly doubled in the buffer.
Diffstat (limited to 'ext')
-rw-r--r--ext/iconv/iconv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 227850aa62..ee659c39be 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -1580,7 +1580,7 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
if (err != PHP_ICONV_ERR_SUCCESS) {
if ((mode & PHP_ICONV_MIME_DECODE_CONTINUE_ON_ERROR)) {
/* pass the entire chunk through the converter */
- err = _php_iconv_appendl(pretval, encoded_word, (size_t)((p1 + 1) - encoded_word), cd_pl);
+ err = _php_iconv_appendl(pretval, encoded_word, (size_t)(p1 - encoded_word), cd_pl);
if (err != PHP_ICONV_ERR_SUCCESS) {
goto out;
}