summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-10-10 16:01:03 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-10-10 16:01:03 +0000
commitadb2ce0ceb33f09fe256ab3b78d61440f9e3ec24 (patch)
tree6af5311ce6960d759cff27a90b54d04883a7c926
parentb836a145bfd1a79b410286751b59bffb15acf357 (diff)
downloadpcre-adb2ce0ceb33f09fe256ab3b78d61440f9e3ec24.tar.gz
PCRE_NO_START_OPTIMIZE, if given to pcre_compile(), did not suppress the
subject length check at run time. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@728 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--pcre_dfa_exec.c2
-rw-r--r--pcre_exec.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/pcre_dfa_exec.c b/pcre_dfa_exec.c
index 62d03c5..96f198c 100644
--- a/pcre_dfa_exec.c
+++ b/pcre_dfa_exec.c
@@ -3330,7 +3330,7 @@ for (;;)
disabling is explicitly requested (and of course, by the test above, this
code is not obeyed when restarting after a partial match). */
- if ((options & PCRE_NO_START_OPTIMIZE) == 0 &&
+ if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0 &&
(options & (PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT)) == 0)
{
/* If the pattern was studied, a minimum subject length may be set. This
diff --git a/pcre_exec.c b/pcre_exec.c
index 7ab3900..2b1a6dd 100644
--- a/pcre_exec.c
+++ b/pcre_exec.c
@@ -6365,7 +6365,7 @@ for(;;)
/* The following two optimizations are disabled for partial matching or if
disabling is explicitly requested. */
- if ((options & PCRE_NO_START_OPTIMIZE) == 0 && !md->partial)
+ if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0 && !md->partial)
{
/* If the pattern was studied, a minimum subject length may be set. This is
a lower bound; no actual string of that length may actually match the