summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug70345.phpt
blob: 0947ba3daad5ddc982a844f3d319fc40b3ef99e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Bug #70345 (Multiple vulnerabilities related to PCRE functions)
--FILE--
<?php
$regex = '/(?=xyz\K)/';
$subject = "aaaaxyzaaaa";

$v = preg_split($regex, $subject);
print_r($v);

$regex = '/(a(?=xyz\K))/';
$subject = "aaaaxyzaaaa";
preg_match($regex, $subject, $matches);

var_dump($matches);
--EXPECTF--
Array
(
    [0] => aaaaxyzaaaa
)

Warning: preg_match(): Get subpatterns list failed in %s on line %d
array(0) {
}