summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-08-262-2/+18
|\ | | | | | | | | * PHP-7.2: Fix #68180: iconv_mime_decode can return extra characters in a header
| * Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-262-2/+18
| |\ | | | | | | | | | | | | * PHP-7.1: Fix #68180: iconv_mime_decode can return extra characters in a header
| | * Fix #68180: iconv_mime_decode can return extra characters in a headerChristoph M. Becker2018-08-262-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-08-252-1/+27
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix #60494: iconv_mime_decode does ignore special characters
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-252-1/+27
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix #60494: iconv_mime_decode does ignore special characters
| | * Fix #60494: iconv_mime_decode does ignore special charactersChristoph M. Becker2018-08-252-1/+27
| | | | | | | | | | | | | | | | | | We must not ignore erroneous characters in mime headers, but rather let iconv_mime_decode() fail in this case, issuing the usual notice regarding illegal characters.
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-08-252-0/+88
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix #63839: iconv_mime_decode_headers function is skipping headers
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-252-0/+88
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix #63839: iconv_mime_decode_headers function is skipping headers
| | * Fix #63839: iconv_mime_decode_headers function is skipping headersChristoph M. Becker2018-08-252-0/+88
| | | | | | | | | | | | | | | | | | | | | We have to cater to the possibility that `=?` is not the start of an encoded-word, but rather a literal `=?`. If a line break is found while we're still looking for the charset, we can safely assume that it's a literal `=?`, and act accordingly.
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-08-252-0/+39
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix #55146: iconv_mime_decode_headers() skips some headers
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-252-0/+39
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix #55146: iconv_mime_decode_headers() skips some headers
| | * Fix #55146: iconv_mime_decode_headers() skips some headersChristoph M. Becker2018-08-252-0/+39
| | | | | | | | | | | | | | | | | | If we're expecting the start of an encoded word (`=?`), but instead of the question mark get a line break (CR or LF), we must not append it to the `pretval`.
* | | Fix #53891: iconv_mime_encode() fails to Q-encode UTF-8 stringChristoph M. Becker2018-08-252-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The minimum length of an encoded-word is actually the pure encoding overhead plus the length of the `output-charset` plus the minimum unit of encoded text, which is 4 for B-encoding and (for simplicity) 3 for Q-encoding. We also cater to the possibility that we need further encoded words, which would be split by the `line-break-chars` followed by a space character. Obviously, the former `out_charset_len + 12` is too simplistic and wrong in the given case (where the magic number would be 13). These simplifications are somewhat wasteful, but iconv_mime_encode() with Q-encoding is wasteful anyway (see bug 66828[1]), and the proper solution to convert the whole input to the desired output charset upfront, and applying the encoding afterwards appears too much a change for the stable releases. [1] <https://bugs.php.net/66828>
* | | Fix #76712: Assignment of empty string creates extraneous text nodeChristoph M. Becker2018-08-252-3/+25
| | | | | | | | | | | | | | | | | | We work around this peculiarity of libxml by using xmlNodeSetContent(), which does not exhibit this behavior. This also saves us from manually calculating the string length.
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-08-231-17/+9
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Simplify regression test
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-231-17/+9
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Simplify regression test
| | * Simplify regression testChristoph M. Becker2018-08-231-17/+9
| | | | | | | | | | | | | | | | | | | | | There's no need to actually try to trigger an out-of-memory condition to proof the leak; instead we can simply rely on the Zend MM to report the memory leaks in debug mode (at least on Linux). Therefore we simplify the regression test, which also makes it run much faster.
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-08-222-0/+28
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix #68825: Exception in DirectoryIterator::getLinkTarget()
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-222-0/+28
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix #68825: Exception in DirectoryIterator::getLinkTarget()
| | * Fix #68825: Exception in DirectoryIterator::getLinkTarget()Christoph M. Becker2018-08-222-0/+28
| | | | | | | | | | | | | | | | | | intern->file_name may not have been properly set when DirectoryIterator::getLinkTarget() is called, so we make sure it is before using it.
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-08-221-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Increase memory_limit to prevent test failures
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-221-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Increase memory_limit to prevent test failures
| | * Increase memory_limit to prevent test failuresChristoph M. Becker2018-08-221-1/+1
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-08-222-0/+27
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix #76778: array_reduce leaks memory if callback throws exception
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-222-0/+27
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix #76778: array_reduce leaks memory if callback throws exception
| | * Fix #76778: array_reduce leaks memory if callback throws exceptionChristoph M. Becker2018-08-222-0/+27
| | | | | | | | | | | | We have to release the result variable in the error case, too.
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-08-222-2/+45
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fixed bug #76777 and added test
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-222-2/+45
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fixed bug #76777 and added test
| | * Fixed bug #76777 and added testVille Hukkamaki2018-08-222-2/+45
| | | | | | | | | | | | Set undefined values to null rather than undefined.
* | | Avoid directly adding to string literalDavid Carlier2018-08-211-15/+35
| | | | | | | | | | | | This fixes a Clang warning.
* | | Avoid hash lookups in BIND_STATIC and BIND_LEXICAL opcode handlers.Dmitry Stogov2018-08-203-4/+4
| | | | | | | | | | | | Encode static variable offset into opline->extended_value.
* | | Make array parsing parameters error messages consistency with ZPP failureGabriel Caruso2018-08-1953-1666/+1666
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Jakub Zelenka2018-08-193-2/+97
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.1' into PHP-7.2Jakub Zelenka2018-08-193-2/+97
| |\ \ | | |/
| | * Fix bug #76705 (unusable ssl => peer_fingerprint in stream_context_create())Jakub Zelenka2018-08-193-2/+97
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-08-182-1/+19
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.2: Add regression test for bug #68175 Fix #68175: RegexIterator pregFlags are NULL instead of 0
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-08-182-1/+19
| |\ \ | | |/ | | | | | | | | | | | | * PHP-7.1: Add regression test for bug #68175 Fix #68175: RegexIterator pregFlags are NULL instead of 0
| | * Add regression test for bug #68175Christoph M. Becker2018-08-181-0/+18
| | |
| | * Fix #68175: RegexIterator pregFlags are NULL instead of 0Tim Siebels2018-08-181-1/+1
| | |
* | | Add test for bug #76738Anatol Belski2018-08-171-0/+234
| | | | | | | | | | | | | | | Original repro. It's unwieldy, but it's otherwise hard to trigger the wrong buffer handling behavior.
* | | Fix memory leakAnatol Belski2018-08-171-2/+8
| | |
* | | CleanupAnatol Belski2018-08-171-4/+0
| | | | | | | | | | | | (cherry picked from commit 8b3174f256147a1708821621a8cbe2b257fca737)
* | | Followup fix for ef9ed19e, see also bug #76738Anatol Belski2018-08-171-19/+7
| | | | | | | | | | | | (cherry picked from commit 083285f22a74989689f97d1d53476e7eaec35acc)
* | | Fixed buildXinchen Hui2018-08-171-0/+12
| | | | | | | | | | | | (cherry picked from commit 36f05a80d7cf11fffb827c7f0b6c8e73d3846e8e)
* | | DOMDocument::formatOutput attribute sometimes ignoredAndrew Nester2018-08-172-7/+28
| | | | | | | | | | | | (cherry picked from commit ef9ed19ec7f141311feea1d42467f5773cfc09bc)
* | | Fixed same bug #76755 in setrawcookieXinchen Hui2018-08-171-1/+1
| | |
* | | Cheaper checkingXinchen Hui2018-08-171-20/+11
| | |
* | | Micro optimization & fixed invalid key handlingXinchen Hui2018-08-172-14/+11
| | |
* | | Fixed bug #76755 (setcookie does not accept "double" type for expire time)Xinchen Hui2018-08-172-1/+9
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Xinchen Hui2018-08-161-8/+9
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.2: Update NEWS Fixed bug #76747 (Opcache treats path containing "test.pharma.tld" as a phar file)