1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00
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-01-02 12:53:31 +08:00
2018-09-11 23:58:17 +02:00
2018-01-02 12:53:31 +08:00
2018-09-09 12:29:23 -07:00
2017-09-21 00:04:08 +01:00
2015-12-05 22:48:29 +01:00
2018-01-02 12:53:31 +08:00
2018-09-19 09:37:04 +02:00
2018-05-26 22:05:06 +02:00
2018-07-12 13:45:30 +02:00
2018-04-05 14:52:40 +02:00
2016-05-18 17:45:12 +02:00
2014-12-04 17:56:20 +00:00
2018-09-11 23:58:17 +02:00
2018-02-23 17:57:26 -08:00
2018-01-02 12:53:31 +08:00
2016-04-05 12:13:38 +02:00
2009-11-23 21:53:30 +00:00
2015-01-29 14:24:20 +08:00
MFH
2008-01-17 14:38:16 +00:00
2016-12-17 00:13:01 +01:00
2014-06-05 17:45:22 +02:00
2015-02-07 10:35:52 -06:00
2018-01-02 12:53:31 +08:00
2017-01-14 13:28:21 +01:00
2016-08-11 08:08:26 +09:00

The PHP Interpreter

This is the github mirror of the official PHP repository located at http://git.php.net.

Build Status Build status

Pull Requests

PHP accepts pull requests via github. Discussions are done on github, but depending on the topic can also be relayed to the official PHP developer mailing list internals@lists.php.net.

New features require an RFC and must be accepted by the developers. See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more information on the process.

Bug fixes do not require an RFC, but require a bugtracker ticket. Always open a ticket at https://bugs.php.net and reference the bug id using #NNNNNN.

Fix #55371: get_magic_quotes_gpc() throws deprecation warning

After removing magic quotes, the get_magic_quotes_gpc function caused
a deprecate warning. get_magic_quotes_gpc can be used to detected
the magic_quotes behavior and therefore should not raise a warning at any
time. The patch removes this warning

We do not merge pull requests directly on github. All PRs will be pulled and pushed through http://git.php.net.

Guidelines for contributors

Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-22T16:25:23.756Z
Readme BSD-3-Clause 1 GiB
Languages
C 66%
PHP 31.3%
C++ 0.8%
Shell 0.5%
M4 0.4%
Other 0.8%