summaryrefslogtreecommitdiff
path: root/sapi/apache_hooks/php_apache.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2018-08-26 12:59:17 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2018-08-26 13:18:35 +0200
commitefb86aef12ff4f8f3908ceff2844f7511f7d61eb (patch)
tree89e408facbb0475ddb7d370ec393ba8f8cc31084 /sapi/apache_hooks/php_apache.c
parente29c946c29afdb0bf89c5329fcf3038448d50e17 (diff)
downloadphp-git-efb86aef12ff4f8f3908ceff2844f7511f7d61eb.tar.gz
Fix #68180: iconv_mime_decode can return extra characters in a header
Basically, the algorithm to append a converted string to an existing `smart_str` works by increasing the `smart_str` buffer, to let `iconv` convert characters until there is no more space, to set the new length of the `smart_str` and to repeat until there is no more input. Formerly, the new length calculation has been wrong, though, since we would have to take the old `out_len` into account (`buf_growth - old_out_len - out_len`). However, since there is no need to take the old `out_len` into account when increasing the `smart_str` buffer, we can simplify the fix, avoiding an additional variable.
Diffstat (limited to 'sapi/apache_hooks/php_apache.c')
0 files changed, 0 insertions, 0 deletions