1
0
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:
Stanislav Malyshev
2019-07-29 14:51:21 -07:00
2 changed files with 11 additions and 1 deletions

View File

@@ -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;

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