You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php$string = 'This is a string. It contains numbers (0*9) as well as parentheses and some other things!';
$fusion = preg_replace(array('/\b\w{1}s/', '/(\d{1})*(\d{1})/', '/[\(!\)]/'), array('test', '$1 to $2', '*'), $string);
Resulted in this output:
/php-src/ext/pcre/php_pcre.c:1753:49: runtime error: addition of unsigned offset to 0x7fefcf8491f8 overflowed to 0x7fefcf8491f7
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/pcre/php_pcre.c:1753:49
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04
The text was updated successfully, but these errors were encountered:
libpcre2 can return the special value -1 for a non-match.
In this case we get pointer overflow, although it doesn't matter in
practice because the pointer will be in bounds and the copy length will
be 0. Still, we should fix the UBSAN warning.
Description
The following code:
Resulted in this output:
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04
The text was updated successfully, but these errors were encountered: