Revision: 728
http://vcs.pcre.org/viewvc?view=rev&revision=728
Author: ph10
Date: 2011-10-10 17:01:03 +0100 (Mon, 10 Oct 2011)
Log Message:
-----------
PCRE_NO_START_OPTIMIZE, if given to pcre_compile(), did not suppress the
subject length check at run time.
Modified Paths:
--------------
code/trunk/pcre_dfa_exec.c
code/trunk/pcre_exec.c
Modified: code/trunk/pcre_dfa_exec.c
===================================================================
--- code/trunk/pcre_dfa_exec.c 2011-10-10 10:35:50 UTC (rev 727)
+++ code/trunk/pcre_dfa_exec.c 2011-10-10 16:01:03 UTC (rev 728)
@@ -3330,7 +3330,7 @@
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
Modified: code/trunk/pcre_exec.c
===================================================================
--- code/trunk/pcre_exec.c 2011-10-10 10:35:50 UTC (rev 727)
+++ code/trunk/pcre_exec.c 2011-10-10 16:01:03 UTC (rev 728)
@@ -6365,7 +6365,7 @@
/* 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