summaryrefslogtreecommitdiff
path: root/ext/mbstring
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | * 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.
* | | Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2019-09-231-0/+15
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix #78559: Heap buffer overflow in mb_eregi
| * | Fix #78559: Heap buffer overflow in mb_eregiChristoph M. Becker2019-09-232-0/+16
| | | | | | | | | | | | We backport kkos/oniguruma@d3e402928b6eb3327f8f7d59a9edfa622fec557b.
* | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-09-211-0/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix #78579: mb_decode_numericentity: args number inconsistency
| * | 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
* | | | Add missing SKIPIF (mbstring)Fabien Villepinte2019-09-044-0/+8
| | | |
* | | | Don't short-circuit MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONENikita Popov2019-08-0954-195/+68
| | | | | | | | | | | | | | | | | | | | Make sure we always go through mbfl_filt_conv_illegal_output(), so that the number of illegal characters gets counted.
* | | | Deprecate encoding as 3rd param to mb_strrpos()Nikita Popov2019-07-223-2/+18
| | | |
* | | | Put oniguruma include path to proper CFLAGSChristoph M. Becker2019-07-191-1/+1
| | | |
* | | | Move Oniguruma related config stuff to where it belongsChristoph M. Becker2019-07-191-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Oniguruma is exclusively used by ext/mbstring, and only if mbregex is enabled. Therefore it is unnecessary and confusing to have Oniguruma related config stuff scattered elsewhere. While we're at it, we also remove the referral to the bundled libonig which is removed as of PHP 7.4.0, and the duplicated call to `PHP_INSTALL_HEADERS()`.
* | | | Remove unused definesPeter Kokot2019-07-181-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Used in php-src the past and today removed and not used anymore: - HAVE_CURL_EASY_STRERROR - HAVE_CURL_MULTI_STRERROR - HAVE_NEW_MIME2TEXT - HAVE_MBSTR_CN - HAVE_MBSTR_JA - HAVE_MBSTR_KR - HAVE_MBSTR_RU - HAVE_MBSTR_TW Part of oniguruma which doesn't use these anymore - NOT_RUBY - HAVE_STDARG_PROTOTYPES Unused: - HAVE_MPIR Closes GH-4427
* | | | Fix unused variable warnings when mbregex disabledNikita Popov2019-07-011-0/+2
| | | |
* | | | Fix region leak in mb_ereg_replaceNikita Popov2019-06-251-1/+1
| | | |
* | | | Fix shift UB in mbfilter_utf32.cNikita Popov2019-06-191-1/+1
| | | |
* | | | Cheaper checks for exceptions thrown from __toString()Dmitry Stogov2019-06-061-4/+4
| | | |
* | | | Allow exceptions in __toString()Nikita Popov2019-06-052-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
* | | | Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now
* | | | Remove unused symbol definitionPeter Kokot2019-05-111-1/+0
| | | |
* | | | Remove redundant memory.h filePeter Kokot2019-05-111-5/+0
| | | | | | | | | | | | | | | | | | | | The memory.h file is part of the pre-C89 era and is on today's systems only a simple wrapper for including the final string.h header file.
* | | | Simplify ext/mbstring/libmbfl/config.h creationPeter Kokot2019-05-112-68/+6
| | | | | | | | | | | | | | | | | | | | - The config.h.in is part of the standalone libmbfl library and it is forked and bundled.
* | | | Integrate libmbfl docs to README.md and LICENSEPeter Kokot2019-05-116-123/+139
| | | | | | | | | | | | | | | | | | | | | | | | - All credits, license info preserved, only merged together to not have to many places to edit. - Changelogs integrated in the readme since they are not used anymore.
* | | | [ci skip] Move OpenLDAP license to redistributable info filePeter Kokot2019-05-061-47/+0
| | | |
* | | | Move ucgendata README to generator file headerPeter Kokot2019-04-202-8/+8
| | | |
* | | | Fixed compatibility with phpdbgDmitry Stogov2019-04-181-0/+2
| | | |
* | | | Remove some uses of deprecated internal_encoding settings in testsNikita Popov2019-04-1732-48/+20
| | | |
* | | | Fix internal_encoding fallback in mbstringNikita Popov2019-04-176-93/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By introducing a hook that is called whenever one of internal_encoding / input_encoding / output_encoding changes, so that mbstring can adjust it's internal state. This also makes internal_encoding work with zend multibyte.
* | | | Disable PACKAGE_* preprocessor symbolsPeter Kokot2019-04-131-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autoconf defines PACKAGE_* symbols: - PACKAGE_NAME - PACKAGE_VERSION - PACKAGE_TARNAME - PACKAGE_STRING - PACKAGE_BUGREPORT - PACKAGE_URL and appends them to the generated config.h.in files. With AC_INIT change via afd52f9d9986d92dd0c63832a07ab1a16bf11d53 where package version, URL, bug report location and similar meta data are defined, these preprocessor macros are then non empty strings in the generated configuration header file. When using phpize, PHP shares the config files in extensions, warnings of redefined macros appear, such as: - `warning: 'PACKAGE_NAME' macro redefined` This patch now disables these non utilized symbols in the generated config header files. Better practice would be to include only API specific headers where needed but this would require even more refactorings. Some extensions such as pcre, pgsql, and pdo_pgsql solve this issue by undefining some of these symbols before including the library configuration headers in the code also. Because these symbols can be defined by any library which uses Autotools. Additionally, the unused PACKAGE_* symbols were cleaned for the bundled libmbfl library and with this patch not needed undef code removed.
* | | | Avoid misc uninitialized variable warningsNikita Popov2019-04-121-1/+1
| | | |
* | | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-04-122-4/+22
|\ \ \ \ | |/ / /
| * | | 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
| | | |
* | | | Use EMPTY_SWITCH_DEFAULT_CASE in php_unicode.cNikita Popov2019-04-121-3/+1
| | | | | | | | | | | | | | | | Avoids a potentially uninitialized variable warning.
* | | | Remove incorrect mbstring includesNikita Popov2019-04-112-3/+0
| | | | | | | | | | | | | | | | And thus fix unused variable warnings.
* | | | Remove unused function prototypeNikita Popov2019-04-111-2/+0
| | | |