com php-src: use a suitable number of patterns to show the bug is resolved, not a stupid number that could cause memory limit to be exceeded or other
side effects: ext/pcre/tests/bug47662.phpt
| From: | Joe Watkins | Date: | Thu, 21 Aug 2014 08:14:46 +0000 |
| Subject: | com php-src: use a suitable number of patterns to show the bug is resolved, not a stupid number that could cause memory limit to be exceeded or other side effects: ext/pcre/tests/bug47662.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-80666@lists.php.net to get a copy of this message | ||
Commit: 1ba509ce193ffc7b0f50068ab058b0a8ada9f2d0
Author: krakjoe <joe.watkins@live.co.uk> Thu, 21 Aug 2014 09:14:46 +0100
Parents: 051671ba6c5683080a0a54017f261953a6faa7c6
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1ba509ce193ffc7b0f50068ab058b0a8ada9f2d0
Log:
use a suitable number of patterns to show the bug is resolved, not a stupid number that could cause
memory limit to be exceeded or other side effects
Changed paths:
M ext/pcre/tests/bug47662.phpt
Diff:
diff --git a/ext/pcre/tests/bug47662.phpt b/ext/pcre/tests/bug47662.phpt
index d605674..abf65e6 100644
--- a/ext/pcre/tests/bug47662.phpt
+++ b/ext/pcre/tests/bug47662.phpt
@@ -4,9 +4,10 @@ Bug #47662 (support more than 127 named subpatterns)
<?php
$regex = '@';
-for($bar=0; $bar<1027; $bar++) {
+for($bar=0; $bar<129; $bar++) {
$regex .= '((?P<x'.$bar.'>))';
}
+
$regex ..= 'fo+bar@';
var_dump(preg_match($regex, 'foobar'));