summaryrefslogtreecommitdiff
path: root/ext/mbstring
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-07-082-5/+29
|\ | | | | | | | | * PHP-7.3: Fix bug #79787
| * Fix bug #79787XXiang2020-07-082-5/+29
| | | | | | | | Closes GH-5807.
* | Add mbregex skipifNikita Popov2020-06-171-0/+5
| |
* | Fix non-default syntax in mb_ereg_search()Nikita Popov2020-06-162-5/+16
| |
* | Fix testNikita Popov2020-04-081-2/+3
| |
* | Merge branch 'PHP-7.3' into PHP-7.4George Peter Banyard2020-04-075-28/+33
|\ \ | |/ | | | | | | | | * PHP-7.3: Revert "Went to fast and forgot to update tests" Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"
| * Revert "Went to fast and forgot to update tests"George Peter Banyard2020-04-073-16/+32
| | | | | | | | This reverts commit 656eac74fa6074aebc087bb73d2e4651f7dc8c9e.
| * Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but ↵George Peter Banyard2020-04-072-12/+1
| | | | | | | | | | | | | | | | | | mb_substitute_character(0) fails" This commit brings some substantial changes in behaviour due to the weird implementation. This will be fixed in master due to BC concerns. This reverts commit 1333b46d6dc0c293c1fd626803f91bc69743eb79.
* | Merge branch 'PHP-7.3' into PHP-7.4George Peter Banyard2020-04-033-34/+17
|\ \ | |/
| * Went to fast and forgot to update testsGeorge Peter Banyard2020-04-033-32/+16
| | | | | | | | However due to the really lax conversion to integer all strings pass as 0
* | Merge branch 'PHP-7.3' into PHP-7.4George Peter Banyard2020-04-032-1/+12
|\ \ | |/
| * Fix Bug #79448 0 is a valid Unicode codepoint, but ↵George Peter Banyard2020-04-032-1/+12
| | | | | | | | mb_substitute_character(0) fails
* | Merge branch 'PHP-7.3' into PHP-7.4George Peter Banyard2020-04-013-4/+17
|\ \ | |/
| * Fix bug 79441George Peter Banyard2020-04-013-4/+17
| |
| * Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflowChristoph M. Becker2020-03-162-1/+15
| | | | | | | | We make sure that negative values are properly compared.
* | Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflowChristoph M. Becker2020-03-162-1/+15
| | | | | | | | We make sure that negative values are properly compared.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-301-0/+2
|\ \ | |/ | | | | | | * PHP-7.3: Add SKIPIF to test requiring mbregex
| * Add SKIPIF to test requiring mbregexNikita Popov2020-01-301-0/+2
| |
* | Fix shift ub in mbstringNikita Popov2020-01-302-8/+8
| | | | | | | | Ideally "c" would be an unsigned integer...
* | Restore digit check in mb_decode_numericentity()Nikita Popov2020-01-302-1/+3
| | | | | | | | | | | | | | I replaced it with a multiplication overflow check in 18599f9c52959b2e8cbfac57e278644499a3547d. However, we need both, because the code for restoring the number can't handle numbers with many leading zeros right now and I don't feel like teaching it.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-292-4/+9
|\ \ | |/ | | | | | | * PHP-7.3: Fix mb_ord() crash if internal encoding not supported
| * Fix mb_ord() crash if internal encoding not supportedNikita Popov2020-01-292-4/+9
| | | | | | | | | | enc_name can be NULL here. Take the name from the mbfl_encoding instead.
* | Better overflow check for entity decodingNikita Popov2020-01-292-3/+6
| | | | | | | | Check for multiplication overflow rather than number of digits.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-291-0/+1
|\ \ | |/ | | | | | | * PHP-7.3: Reset MBREX(search_re) in RSHUTDOWN
| * Reset MBREX(search_re) in RSHUTDOWNNikita Popov2020-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is going to cause a segfault if reused in the next request. To illustrate the issue, run these two scripts in sequence with the built-in server: // script1.php mb_ereg_search_init('foobar'); mb_ereg_search('foo'); // script2.php var_dump(mb_ereg_search_init("foobar")); var_dump(mb_ereg_search_pos());
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-292-3/+22
|\ \ | |/ | | | | | | * PHP-7.3: Fix use of mb_ereg_search_getregs() after invalid pattern
| * Fix use of mb_ereg_search_getregs() after invalid patternNikita Popov2020-01-292-3/+22
| | | | | | | | | | This segfaulted because we assumed that if there are matches, there must be a regular expression as well.
| * Don't leak encoding_strChristoph M. Becker2020-01-221-0/+1
| |
* | Fix length inconsistency in mb_convert_encodingNikita Popov2020-01-292-1/+5
| | | | | | | | | | | | | | | | Don't mix strlen() and ZSTR_LEN(). If the encoding contains a NULL byte, this will overflow the buffer. NULL bytes will still make this behave oddly because the consuming code will cut off the string there, but let's address that in master...
* | Fix recovery of large entities in mb_decode_numericentity()Nikita Popov2020-01-292-6/+10
| | | | | | | | Make sure we don't overflow the integer.
* | Fix memory leak in mb_str_splitNikita Popov2020-01-282-2/+11
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-01-221-0/+34
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79154: mb_convert_encoding() can modify $from_encoding
| * Fix #79154: mb_convert_encoding() can modify $from_encodingChristoph M. Becker2020-01-222-5/+38
| | | | | | | | We must not modify arrays passed by value.
* | Fix #79149: SEGV in mb_convert_encoding with non-string encodingsChristoph M. Becker2020-01-222-3/+24
| | | | | | | | | | We must not assume that `hash_entry` `IS_STRING`, but rather use `encoding_str` which is guaranteed to be.
* | Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2020-01-202-2/+12
|\ \ | |/ | | | | | | | | | | | | * PHP-7.3: Update NEWS Fix bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`) Fix #79099: OOB read in php_strip_tags_ex Fix #79091: heap use-after-free in session_create_id()
| * Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2020-01-202-2/+12
| |\ | | | | | | | | | | | | | | | | | | | | | * PHP-7.2: Update NEWS Fix bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`) Fix #79099: OOB read in php_strip_tags_ex Fix #79091: heap use-after-free in session_create_id()
| | * Fix bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`)Stanislav Malyshev2020-01-202-5/+22
| | |
| * | Upgrade to Oniguruma 6.9.4Christoph M. Becker2019-11-3073-2923/+3688
| | | | | | | | | | | | Oniguruma 6.9.4 fixes several CVEs.
| * | Add missing skip checksChristoph M. Becker2019-11-291-1/+5
| | |
| * | Partially revert "Adapt test cases for Oniguruma 6.9.4"Christoph M. Becker2019-11-292-33/+0
| | | | | | | | | | | | | | | | | | | | | This partially reverts commit c55d09c2f547634b577aa5aeaa1438d772bc29d1, because `MB_ONIGURUMA_VERSION` is only available as of PHP 7.4.0, so that change made no sense for PHP-7.3; we keep it for PHP-7.4, though. We also stick with the modification to bug78633.phpt.
* | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-11-293-2/+40
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Adapt test cases for Oniguruma 6.9.4
| * | Adapt test cases for Oniguruma 6.9.4Christoph M. Becker2019-11-293-2/+40
| | | | | | | | | | | | | | | | | | Apparently, bug 78633 has now really been fixed; the former fix only catered to the buffer overflow, but yielded a wrong result. Also, the order of the named captures has been fixed.
| * | Remove obsolete oniguruma.patchChristoph M. Becker2019-11-051-28/+0
| | | | | | | | | | | | | | | The proper `SIZEOF_SIZE_T` definitions are available as of Oniguruma 6.9.1; no more need to patch.
* | | Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2019-10-201-0/+13
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix #78633: Heap buffer overflow (read) in mb_eregi
| * | Fix #78633: Heap buffer overflow (read) in mb_eregiChristoph M. Becker2019-10-203-1/+15
| | | | | | | | | | | | We backport kkos/oniguruma@15c4228aa2ffa02140a99912dd3177df0b1841c6.
* | | Limit retry_limit test to oniguruma >= 6.9.3Nikita Popov2019-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | This test is somewhat fragile in that it depends on how well a particular regex is optimized. Apparently on 6.9.1 this regex would hit the default retry_limit of 1000000 already. I'm limiting this to 6.9.3 because that's the version that works for me.
* | | Add support for mbstring.regex_retry_limitNikita Popov2019-10-064-1/+39
| | | | | | | | | | | | | | | | | | This is very similar to the existing mbstring.regex_stack_limit, but for backtracking. The default value matches pcre.backtrack_limit. Only used on libonig >= 2.8.0.
* | | Skip tests for old versions instead of marking them XFAILChristoph M. Becker2019-09-302-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | According to commit 0eea9a6[1], these tests fail with old Oniguruma versions; we are not sure which version of Oniguruma is required to let them pass, but at least 6.9.3 is sufficient. [1] <http://git.php.net/?p=php-src.git;a=commit;h=0eea9a642941ab5d4c612f8092f186977afbb73e>
* | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-09-302-20/+30
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix #78609: mb_check_encoding() no longer supports stringable objects
| * | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-09-302-20/+28
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fix #78609: mb_check_encoding() no longer supports stringable objects