php-src/ext/pcre/tests/bug70345.phpt
Nikita Popov 661bce47ae Fixed bug #76127
Per documentation, and consistent with other preg functions, we
should return false if an error occurred.
2019-03-19 13:57:39 +01:00

21 lines
400 B
PHP

--TEST--
Bug #70345 (Multiple vulnerabilities related to PCRE functions)
--FILE--
<?php
$regex = '/(?=xyz\K)/';
$subject = "aaaaxyzaaaa";
var_dump(preg_split($regex, $subject));
$regex = '/(a(?=xyz\K))/';
$subject = "aaaaxyzaaaa";
preg_match($regex, $subject, $matches);
var_dump($matches);
--EXPECTF--
bool(false)
Warning: preg_match(): Get subpatterns list failed in %s on line %d
array(0) {
}