summaryrefslogtreecommitdiff
path: root/ext/mbstring
Commit message (Collapse)AuthorAgeFilesLines
* Add SKIPIF to test requiring mbregexNikita Popov2020-01-301-0/+2
|
* 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.
* 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());
* 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 #79154: mb_convert_encoding() can modify $from_encodingChristoph M. Becker2020-01-222-5/+38
| | | | We must not modify arrays passed by value.
* 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.
* | 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.
* | Fix #78633: Heap buffer overflow (read) in mb_eregiChristoph M. Becker2019-10-203-1/+15
| | | | | | | | We backport kkos/oniguruma@15c4228aa2ffa02140a99912dd3177df0b1841c6.
* | 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
| * Fix #78609: mb_check_encoding() no longer supports stringable objectsChristoph M. Becker2019-09-302-20/+28
| | | | | | | | We apply type juggling for other types than array.
* | Fix #78559: Heap buffer overflow in mb_eregiChristoph M. Becker2019-09-232-0/+16
| | | | | | | | We backport kkos/oniguruma@d3e402928b6eb3327f8f7d59a9edfa622fec557b.
* | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-09-211-0/+1
|\ \ | |/ | | | | | | * PHP-7.2: Fix #78579: mb_decode_numericentity: args number inconsistency
| * Fix #78579: mb_decode_numericentity: args number inconsistencyChristoph M. Becker2019-09-211-0/+1
| | | | | | | | | | | | | | | | | | mb_decode_numericentity() accepts a fourth optional parameter, which is unused, however. Since this parameter doesn't do any harm, and to avoid the small BC break, we're keeping this parameter for PHP 7, but adjust the arginfo. For PHP 8, we will remove this parameter.
* | Upgrade oniguruma lib to 6.9.3Stanislav Malyshev2019-08-2764-10853/+14742
| |
* | Update Oniguruma to 6.9.1Stanislav Malyshev2019-08-2555-1530/+1724
| |
* | Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2019-08-241-0/+2
|\ \ | |/ | | | | | | | | * PHP-7.2: Fix CVE-2019-13224: don't allow different encodings for onig_new_deluxe() set version for release
| * Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2019-08-241-3/+3
| |\ | | | | | | | | | | | | | | | * PHP-7.1: Fix CVE-2019-13224: don't allow different encodings for onig_new_deluxe() set version for release
| | * Fix CVE-2019-13224: don't allow different encodings for onig_new_deluxe()Stanislav Malyshev2019-08-241-3/+3
| | | | | | | | | | | | Backport from https://github.com/kkos/oniguruma/commit/0f7f61ed1b7b697e283e37bd2d731d0bd57adb55
* | | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-04-122-4/+22
|\ \ \ | |/ /
| * | Fix key leaks in mb_convert_encoding()Nikita Popov2019-04-122-4/+22
| | |
* | | Avoid onig match param unused variable warningNikita Popov2019-04-112-2/+2
| | |
* | | Merge branch 'mb-limit-73' into PHP-7.3Stanislav Malyshev2019-04-015-8/+117
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * mb-limit-73: Add fallbacks for older oniguruma versions Add mbstring.regex_stack_limit to php.ini-* Implement RF bug #72777 - ensure stack limits on mbstring functions.
| * | | Add fallbacks for older oniguruma versionsStanislav Malyshev2019-03-302-2/+25
| | | |
| * | | Implement RF bug #72777 - ensure stack limits on mbstring functions.Yasuo Ohgaki2019-03-285-8/+94
| | | | | | | | | | | | | | | | | | | | The patch creates new config: mbstring.regex_stack_limit, which defaults to 100000.
* | | | Fixed SKIPIF when --disable-mbregex is usedMatteo Beccati2019-03-303-2/+12
| | | |
* | | | Merge branch 'PHP-7.2' into PHP-7.3Matteo Beccati2019-03-304-4/+16
|\ \ \ \ | | |/ / | |/| | | | | | | | | | * PHP-7.2: Fixed SKIPIF when --disable-mbregex is used
| * | | Fixed SKIPIF when --disable-mbregex is usedMatteo Beccati2019-03-3018-15/+63
| | | |
* | | | Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2019-03-288-23/+29
|\ \ \ \ | |/ / / | | / / | |/ / |/| | | | | | | | * PHP-7.2: Validate subject encoding in mb_split and mb_ereg_match Validate pattern against mbregex encoding SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy against potential security flaws
| * | Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2019-03-287-17/+28
| |\ \ | | |/ | | | | | | | | | | | | | | | * PHP-7.1: Validate subject encoding in mb_split and mb_ereg_match Validate pattern against mbregex encoding SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy against potential security flaws
| | * Validate subject encoding in mb_split and mb_ereg_matchNikita Popov2019-03-272-5/+12
| | | | | | | | | | | | | | | We were already validating the subject encoding in most functions, but not these two.
| | * Validate pattern against mbregex encodingNikita Popov2019-03-276-15/+31
| | | | | | | | | | | | | | | | | | Oniguruma does not consistently perform this validation itself (at least on older versions), so make sure we check pattern encoding validity on the PHP side.
* | | Fixed bug #77514Nikita Popov2019-01-242-2/+12
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-01-142-6/+21
|\ \ \ | |/ /
| * | Fixed bug #77454Nikita Popov2019-01-142-6/+21
| | |
* | | Fixed bug #77428Nikita Popov2019-01-082-1/+17
| | | | | | | | | | | | | | | mb_ereg_replace historically has not supported escaping backslashes with backslashes. Go back to that behavior for BC reasons.
* | | Merge branch 'PHP-7.2' into PHP-7.3Remi Collet2019-01-081-1/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: cleanup merge
| * | cleanup mergeRemi Collet2019-01-081-1/+0
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2019-01-065-2/+21
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.2: Fix bug #77418 - Heap overflow in utf32be_mbc_to_code Add NEWS [ci skip] Add NEWS Fix more issues with encodilng length Fix #77270: imagecolormatch Out Of Bounds Write on Heap Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) Fix bug #77370 - check that we do not read past buffer end when parsing multibytes Fix #77269: Potential unsigned underflow in gdImageScale Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) Regenerate certs for openssl tests
| * | Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2019-01-065-2/+21
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.1: Fix bug #77418 - Heap overflow in utf32be_mbc_to_code Add NEWS [ci skip] Add NEWS Fix more issues with encodilng length Fix #77270: imagecolormatch Out Of Bounds Write on Heap Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) Fix bug #77370 - check that we do not read past buffer end when parsing multibytes Fix #77269: Potential unsigned underflow in gdImageScale Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) Regenerate certs for openssl tests
| | * Merge branch 'PHP-5.6' into PHP-7.1Stanislav Malyshev2019-01-065-2/+21
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: Fix bug #77418 - Heap overflow in utf32be_mbc_to_code [ci skip] Add NEWS Fix more issues with encodilng length Fix #77270: imagecolormatch Out Of Bounds Write on Heap Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) Fix bug #77370 - check that we do not read past buffer end when parsing multibytes Fix #77269: Potential unsigned underflow in gdImageScale Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) Regenerate certs for openssl tests
| | | * Fix bug #77418 - Heap overflow in utf32be_mbc_to_codeStanislav Malyshev2019-01-065-2/+21
| | | |
| | | * Fix more issues with encodilng lengthStanislav Malyshev2019-01-066-14/+38
| | | | | | | | | | | | | | | | Should fix bug #77381, bug #77382, bug #77385, bug #77394.
| | | * Fix bug #77371 (heap buffer overflow in mb regex functions - ↵Stanislav Malyshev2019-01-062-0/+11
| | | | | | | | | | | | | | | | compile_string_node)
| | | * Fix bug #77370 - check that we do not read past buffer end when parsing ↵Stanislav Malyshev2019-01-062-0/+22
| | | | | | | | | | | | | | | | multibytes