Download src/php/php-src/ext/pcre/tests/bug70345_old.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 516 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug70345_old.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcre/tests/bug70345_old.phpt
-
curl -L -o bug70345_old.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug70345_old.phpt
516 Bytes
| --TEST-- | |
| Bug #70345 (Multiple vulnerabilities related to PCRE functions) | |
| --SKIPIF-- | |
| if (PCRE_VERSION_MAJOR != 10 || PCRE_VERSION_MINOR >= 38) { | |
| die("skip new pcre version"); | |
| } | |
| --FILE-- | |
| $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) { | |
| } | |