History log of /PHP-7.4/ext/pcre/tests/bug81243.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# 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 ...