diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2018-08-26 12:59:17 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2018-08-26 13:18:35 +0200 |
commit | efb86aef12ff4f8f3908ceff2844f7511f7d61eb (patch) | |
tree | 89e408facbb0475ddb7d370ec393ba8f8cc31084 /sapi/apache_hooks/php_apache.c | |
parent | e29c946c29afdb0bf89c5329fcf3038448d50e17 (diff) | |
download | php-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