mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Fix #78338: Array cross-border reading in PCRE
We backport r1092 from pcre2.
This commit is contained in:
parent
d69894734d
commit
8947fd9e9f
@ -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)
|
||||
|
10
ext/pcre/tests/bug78338.phpt
Normal file
10
ext/pcre/tests/bug78338.phpt
Normal 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
|
Loading…
Reference in New Issue
Block a user