diff options
| author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-11-22 19:21:43 +0100 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-11-22 19:26:26 +0100 |
| commit | e1da72bdf18aa3d413c5324bccfd8dc521c217e3 (patch) | |
| tree | 89949464983945c9452e572bc55df6c91f048c8e /ext/pcre/tests | |
| parent | e981f5af51bf2a16965aad68ae268021dc251c9c (diff) | |
| download | php-git-e1da72bdf18aa3d413c5324bccfd8dc521c217e3.tar.gz | |
Fix #78853: preg_match() may return integer > 1
Commit 54ebebd[1] optimized the match loop, but for this case it has
been overlooked, that we must only loop if we're doing global matching.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=54ebebd686255c5f124af718c966edb392782d4a>
Diffstat (limited to 'ext/pcre/tests')
| -rw-r--r-- | ext/pcre/tests/bug78853.phpt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/pcre/tests/bug78853.phpt b/ext/pcre/tests/bug78853.phpt new file mode 100644 index 0000000000..369ed0f926 --- /dev/null +++ b/ext/pcre/tests/bug78853.phpt @@ -0,0 +1,8 @@ +--TEST-- +Bug #78853 (preg_match() may return integer > 1) +--FILE-- +<?php +var_dump(preg_match('/^|\d{1,2}$/', "7")); +?> +--EXPECT-- +int(1) |
