diff options
author | Anatol Belski <ab@php.net> | 2014-05-09 22:15:54 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-05-09 22:15:54 +0200 |
commit | c62f32c3cc6e85a525dd959bd821c754b9c20e63 (patch) | |
tree | ddb7054a02ac06f44eb92ecee41f15bc2f20605c | |
parent | cf2b9955d4c26393f6d16b71b5c2c69d8d2b7f52 (diff) | |
download | php-git-c62f32c3cc6e85a525dd959bd821c754b9c20e63.tar.gz |
Bug #67238 Ungreedy and min/max quantifier bug in PCRE 8.34 upstream
upstream patch applied
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | ext/pcre/pcrelib/pcre_compile.c | 2 | ||||
-rw-r--r-- | ext/pcre/tests/bug67238.phpt | 10 |
3 files changed, 15 insertions, 1 deletions
@@ -30,6 +30,10 @@ PHP NEWS . Fixed bug #66908 (php-fpm reload leaks epoll_create() file descriptor). (Julio Pintos) +- PCRE: + . Fixed bug #67238 (Ungreedy and min/max quantifier bug, applied patch + from the upstream). (Anatol) + - Phar: . Fix bug #64498 ($phar->buildFromDirectory can't compress file with an accent in its name). (PR #588) 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 |