summaryrefslogtreecommitdiff
path: root/ext/pcre
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-05-09 22:16:42 +0200
committerAnatol Belski <ab@php.net>2014-05-09 22:16:42 +0200
commitc925c7a5b61685c40f15a9099afa1c645a719388 (patch)
treea98f9fdaa238cfccb85e539dfb9497097da207ff /ext/pcre
parenta3f09eb323986fa8e8c4c6e398071eedc6add02e (diff)
parentc62f32c3cc6e85a525dd959bd821c754b9c20e63 (diff)
downloadphp-git-c925c7a5b61685c40f15a9099afa1c645a719388.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Bug #67238 Ungreedy and min/max quantifier bug in PCRE 8.34 upstream
Diffstat (limited to 'ext/pcre')
-rw-r--r--ext/pcre/pcrelib/pcre_compile.c2
-rw-r--r--ext/pcre/tests/bug67238.phpt10
2 files changed, 11 insertions, 1 deletions
diff --git a/ext/pcre/pcrelib/pcre_compile.c b/ext/pcre/pcrelib/pcre_compile.c
index c170c47a00..853fb24793 100644
--- a/ext/pcre/pcrelib/pcre_compile.c
+++ b/ext/pcre/pcrelib/pcre_compile.c
@@ -3623,7 +3623,7 @@ for (;;)
break;
case OP_MINUPTO:
- *code += OP_MINUPTO - OP_UPTO;
+ *code += OP_POSUPTO - OP_MINUPTO;
break;
}
}
diff --git a/ext/pcre/tests/bug67238.phpt b/ext/pcre/tests/bug67238.phpt
new file mode 100644
index 0000000000..117662af6b
--- /dev/null
+++ b/ext/pcre/tests/bug67238.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #67238 Ungreedy and min/max quantifier bug in PCRE 8.34 upstream
+--FILE--
+<?php
+
+echo preg_match('/a{1,3}b/U', 'ab');
+
+?>
+--EXPECTF--
+1