History log of /PHP-8.4/ext/spl/tests/gh14290.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# b3a56bd5 21-May-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-14290: Member access within null pointer in extension spl

php_pcre_replace_impl() can fail and return NULL. We should take that
error condition into account. Because other failure

Fix GH-14290: Member access within null pointer in extension spl

php_pcre_replace_impl() can fail and return NULL. We should take that
error condition into account. Because other failures return false, we
return false here as well.

At first, I also thought there was a potential memory leak in the error
check of replacement_str, but found that the error condition can never
trigger, so replace that with an assertion.

Closes GH-14292.

show more ...