#
712fc54e |
| 29-Nov-2021 |
Christoph M. Becker |
Fix #74604: Out of bounds in php_pcre_replace_impl Trying to allocate a `zend_string` with a length only slighty smaller than `SIZE_MAX` causes an integer overflow; we make sure that thi
Fix #74604: Out of bounds in php_pcre_replace_impl Trying to allocate a `zend_string` with a length only slighty smaller than `SIZE_MAX` causes an integer overflow; we make sure that this doesn't happen by catering to the maximal overhead of a `zend_string`. Closes GH-7597.
show more ...
|
#
56495ac0 |
| 21-Oct-2021 |
Remi Collet |
fix for pcre2 10.38
|
#
a6b43086 |
| 12-Jul-2021 |
Christoph M. Becker |
Fix #81243: Too much memory is allocated for preg_replace() Trimming a potentially over-allocated string appears to be reasonable, so we drop the condition altogether. We also r
Fix #81243: Too much memory is allocated for preg_replace() Trimming a potentially over-allocated string appears to be reasonable, so we drop the condition altogether. We also re-allocate twice the size needed in the first place, and not roughly tripple the size. Closes GH-7231.
show more ...
|
#
1a1d86d5 |
| 06-Jun-2021 |
Anatol Belski |
pcre: Workaround bug #81101 The way to fix it is to disable certain match start optimizaions. The observed performance impact appears negligible ATM, compared to the functional regre
pcre: Workaround bug #81101 The way to fix it is to disable certain match start optimizaions. The observed performance impact appears negligible ATM, compared to the functional regression revealed. A possible side effect might occur if a pattern uses (*COMMIT) or (*MARK), which is however not a very broadly used syntax in PHP. Still this should be observed and handled by possibly adding a possibility to reverse PCRE2_NO_START_OPTIMIZE on the user side. One test shows a behavior change, where instead of int 0 the match would produce an error and return false. Except strict comparison is used, this should be acceptable. Signed-off-by: Anatol Belski <ab@php.net> (cherry picked from commit d188ca7688315e3d32d41a32e0ce7b1f9bffb4cf) Signed-off-by: Anatol Belski <ab@php.net>
show more ...
|
#
4be867e9 |
| 18-Mar-2021 |
Nikita Popov |
Fix locale switch back to C in pcre The compile context is shared between patterns, so we need to set the character tables unconditionally in case we switched from a non-C locale to
Fix locale switch back to C in pcre The compile context is shared between patterns, so we need to set the character tables unconditionally in case we switched from a non-C locale to the C locale.
show more ...
|
#
282355ef |
| 15-Mar-2021 |
Dharman |
Fix bug #80866 Closes GH-6774.
|
#
3a515309 |
| 11-Feb-2020 |
Nikita Popov |
Fixed bug #79257 Replace an existing entry for a given name only if we have a match.
|
#
cd5591a2 |
| 07-Feb-2020 |
Nikita Popov |
PCRE: Only remember valid UTF-8 if start offset zero PCRE only validates the string starting from the start offset (minus maximum look-behind, but let's ignore that), so we can only
PCRE: Only remember valid UTF-8 if start offset zero PCRE only validates the string starting from the start offset (minus maximum look-behind, but let's ignore that), so we can only remember that the string is fully valid UTF-8 is the original start offset is zero.
show more ...
|
#
c9e78e6d |
| 07-Feb-2020 |
Nikita Popov |
PCRE: Check whether start offset is on char boundary We need not just the whole string to be UTF-8, but the start position to be on a character boundary as well. Check this by lookin
PCRE: Check whether start offset is on char boundary We need not just the whole string to be UTF-8, but the start position to be on a character boundary as well. Check this by looking for a continuation byte.
show more ...
|
#
13bfa9f5 |
| 29-Jan-2020 |
Nikita Popov |
Fixed bug #79188
|
Revision tags: php-7.3.13RC1, php-7.2.26RC1, php-7.4.0 |
|
#
e1da72bd |
| 22-Nov-2019 |
Christoph M. Becker |
Fix #78853: preg_match() may return integer > 1 Commit 54ebebd[1] optimized the match loop, but for this case it has been overlooked, that we must only loop if we're doing global matchin
Fix #78853: preg_match() may return integer > 1 Commit 54ebebd[1] optimized the match loop, but for this case it has been overlooked, that we must only loop if we're doing global matching. [1] <http://git.php.net/?p=php-src.git;a=commit;h=54ebebd686255c5f124af718c966edb392782d4a>
show more ...
|
Revision tags: php-7.2.25, php-7.3.12, php-7.4.0RC6 |
|
#
6dcc0b85 |
| 07-Nov-2019 |
Nikita Popov |
Fix php_pcre_mutex_free() We should only set the mutex to NULL if we actually freed it. Due to missing braces non-main threads may currently set it to NULL first.
|
Revision tags: php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1 |
|
#
a8f60ac9 |
| 08-Oct-2019 |
Sergei Turchanov |
Add pcre_get_compiled_regex_cache_ex() with local_aware flag A new function `pcre_get_compiled_regex_cache_ex()` is introduced, which allows to compile regexp pattern using the "C" local
Add pcre_get_compiled_regex_cache_ex() with local_aware flag A new function `pcre_get_compiled_regex_cache_ex()` is introduced, which allows to compile regexp pattern using the "C" locale instead of a current locale. This will be needed to replace setlocale() usage in fileinfo, which is not thread-safe.
show more ...
|
#
1d6e9da7 |
| 04-Oct-2019 |
Nikita Popov |
Improve diagnostic on PCRE JIT mmap failure Print a more informative message that indicates that this is likely a permission issue, and also indicate that pcre.jit=0 can be used to w
Improve diagnostic on PCRE JIT mmap failure Print a more informative message that indicates that this is likely a permission issue, and also indicate that pcre.jit=0 can be used to work around it. Also automatically disable the JIT, so that this message is only shown once. See bug #78630.
show more ...
|
Revision tags: php-7.4.0RC3, php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1 |
|
#
20172984 |
| 13-Aug-2019 |
Nikita Popov |
Mark PCRE locale key as local persistent
|
Revision tags: php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3 |
|
#
e3d35b64 |
| 04-Jul-2019 |
Dmitry Stogov |
Split destructor
|
Revision tags: php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2 |
|
#
03db04c3 |
| 17-Jun-2019 |
Nikita Popov |
Accept null for preg_quote delimiter argument Related to bug #78163.
|
Revision tags: php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1, php-7.2.19, php-7.3.6, php-7.1.30, php-7.2.19RC1, php-7.3.6RC1, php-7.1.29, php-7.2.18, php-7.3.5, php-7.2.18RC1, php-7.3.5RC1, php-7.2.17, php-7.3.4, php-7.1.28 |
|
#
51fb8dc4 |
| 26-Mar-2019 |
Nikita Popov |
Add specialized pair construction API Closes GH-3990.
|
Revision tags: php-7.3.4RC1, php-7.2.17RC1, php-7.1.27, php-7.3.3, php-7.2.16 |
|
#
a31f4642 |
| 26-Feb-2019 |
Nikita Popov |
Allow exceptions in __toString() RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error excep
Allow exceptions in __toString() 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.
show more ...
|
#
e188e417 |
| 24-Apr-2019 |
Dmitry Stogov |
Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference
|
#
e06836a1 |
| 24-Feb-2019 |
Peter Kokot |
Remove checks for locale.h, setlocale, localeconv The `<loccale.h>` header file, setlocale, and localeconv are part of the standard C89 [1] and on current systems can be used uncondition
Remove checks for locale.h, setlocale, localeconv The `<loccale.h>` header file, setlocale, and localeconv are part of the standard C89 [1] and on current systems can be used unconditionally. Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`, `HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in configure.ac [2] can be ommitted and simplifed. The bundled libmagic (file) has also been patched already in version 5.35 and up in upstream location so when it will be patched also in php-src the check for locale.h header is still left in the configure.ac and in windows headers definition file. [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4 Omit the bundled libmagic files
show more ...
|
#
88460c01 |
| 31-Mar-2019 |
Christoph M. Becker |
Fix #77827: preg_match does not ignore \r in regex flags
|
#
a9b01b60 |
| 25-Mar-2019 |
Nikita Popov |
Make PCRE cache per-request on CLI There will only be one request on the CLI SAPI, so there is no advantage to having a persistent PCRE cache. Using a non-persistent cache allows us
Make PCRE cache per-request on CLI There will only be one request on the CLI SAPI, so there is no advantage to having a persistent PCRE cache. Using a non-persistent cache allows us to use arbitrary strings as cache keys.
show more ...
|
#
e7e2056d |
| 22-Mar-2019 |
Nikita Popov |
Remove HAVE_PCRE/HAVE_BUNDLED_PCRE checks PCRE is always available.
|
#
1cf84f15 |
| 21-Mar-2019 |
Nikita Popov |
Try to create interned strings in preg_split as well And convert last_match to last_match_offset, which is more convenient now.
|