mirror of
https://github.com/php/php-src.git
synced 2026-04-12 02:23:18 +02:00
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #78338: Array cross-border reading in PCRE
This commit is contained in:
@@ -8538,7 +8538,7 @@ int lgb, rgb, ricount;
|
||||
PCRE2_SPTR bptr;
|
||||
uint32_t c;
|
||||
|
||||
GETCHARINC(c, cc);
|
||||
c = *cc++;
|
||||
#if PCRE2_CODE_UNIT_WIDTH == 32
|
||||
if (c >= 0x110000)
|
||||
return NULL;
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user