summaryrefslogtreecommitdiff
path: root/ext/mbstring/mbregex.c
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-10-02 08:01:14 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-10-02 08:01:14 +0000
commit6e6732ae6a62869d9f56a5bcf18ac721865ef059 (patch)
treeda9f5c30eff7737751f7757faacc159f898e2fa5 /ext/mbstring/mbregex.c
parent9c33e3d3ce6f537a039b33d638066245910b3282 (diff)
downloadphp-git-6e6732ae6a62869d9f56a5bcf18ac721865ef059.tar.gz
Fix for a regex bug that leads into an infinite loop due to optimization
failure when the pattern is ".*" and both MULTILINE and SINGLELINE options are specified. # This bug was already squashed in HEAD, as it adopts an alternative # implementation.
Diffstat (limited to 'ext/mbstring/mbregex.c')
-rw-r--r--ext/mbstring/mbregex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/mbregex.c b/ext/mbstring/mbregex.c
index 1e6c6effc1..cfda5b4404 100644
--- a/ext/mbstring/mbregex.c
+++ b/ext/mbstring/mbregex.c
@@ -3326,7 +3326,7 @@ re_search(bufp, string, size, startpos, range, regs)
}
}
if (bufp->options & MBRE_OPTIMIZE_ANCHOR) {
- if (bufp->options&MBRE_OPTION_SINGLELINE) {
+ if (bufp->options&MBRE_OPTION_MULTILINE & range > 0) {
goto begbuf_match;
}
anchor = 1;