Fix #78338: Array cross-border reading in PCRE

We backport r1092 from pcre2.
This commit is contained in:
Christoph M. Becker 2019-07-29 19:31:47 +02:00 committed by Stanislav Malyshev
parent d69894734d
commit 8947fd9e9f
2 changed files with 11 additions and 1 deletions

View File

@ -7288,7 +7288,7 @@ int lgb, rgb, ricount;
PCRE2_SPTR bptr;
uint32_t c;
GETCHARINC(c, cc);
c = *cc++;
lgb = UCD_GRAPHBREAK(c);
while (cc < end_subject)

View File

@ -0,0 +1,10 @@
--TEST--
Bug #78338 (Array cross-border reading in PCRE)
--FILE--
<?php
$string = hex2bin('2f5c583f3d3f223f3536ff3636ffffffff36a8a8a83636367a7a7a7a3d2aff2f0a');
preg_match($string, $string);
echo "DONE\n";
?>
--EXPECT--
DONE