1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00
Files
archived-php-src/ext
Christoph M. Becker 9cbe1283f7 Fix #66828: iconv_mime_encode Q-encoding longer than it should be
Before the fix for bug 48289 has been applied, the algorithm to
construct a Q-encoded-word has been optimistic, i.e. try to encode as
many bytes that *may* fit in the remaining space, calculate the actual
length of the Q-encoded word, and if it's too long, try again with a
reduced size.  However, the fix for the mentioned bug replaced this by
a pessimistic algorithm, which always terminates[1] the for loop[2]
during the first iteration (which renders the following 3 lines as dead
code), and as such easily produces unnecessarily short encoded-words.
Instead the proper fix for the bug would have been to make sure that
`out_size` is always decremented, if the space isn't sufficient for the
encoded-word.

[1] <https://github.com/php/php-src/blob/php-7.3.0beta3/ext/iconv/iconv.c#L1421>
[2] <https://github.com/php/php-src/blob/php-7.3.0beta3/ext/iconv/iconv.c#L1360>
2018-09-22 15:20:20 +02:00
..
2018-05-19 13:09:56 +02:00
2018-08-13 15:59:08 +02:00
2018-08-02 18:59:34 +02:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-07-16 16:52:36 -07:00
2018-01-02 12:53:31 +08:00
2018-09-04 04:53:38 +02:00
2018-07-02 17:27:43 +02:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-04-23 22:00:24 -07:00
2018-08-22 12:51:06 +02:00
2018-01-02 12:53:31 +08:00
2018-09-12 16:22:22 +02:00
2018-02-28 02:13:28 +01:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-09-19 12:29:38 +02:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-08-03 07:08:53 +02:00
2018-09-04 05:32:25 +02:00
2018-09-04 05:13:45 +02:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-03-14 22:59:54 +01:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-01-11 14:29:49 +01:00
2018-01-02 12:53:31 +08:00
2018-01-02 12:53:31 +08:00
2018-07-13 20:13:51 +02:00