chiark / gitweb /
Apply upstream revision 1631 (Closes: #815921)
[pcre3.git] / pcre_dfa_exec.c
index fb0c7e805dc32e6b4e59d3a65929dd071f778fb1..170ce6a0016ca3225f098f0be0a1f3535502e482 100644 (file)
@@ -2736,9 +2736,10 @@ for (;;)
             condcode == OP_DNRREF)
           return PCRE_ERROR_DFA_UCOND;
 
-        /* The DEFINE condition is always false */
+        /* The DEFINE condition is always false, and the assertion (?!) is
+        converted to OP_FAIL. */
 
-        if (condcode == OP_DEF)
+        if (condcode == OP_DEF || condcode == OP_FAIL)
           { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
 
         /* The only supported version of OP_RREF is for the value RREF_ANY,
@@ -3242,7 +3243,7 @@ md->callout_data = NULL;
 
 if (extra_data != NULL)
   {
-  unsigned int flags = extra_data->flags;
+  unsigned long int flags = extra_data->flags;
   if ((flags & PCRE_EXTRA_STUDY_DATA) != 0)
     study = (const pcre_study_data *)extra_data->study_data;
   if ((flags & PCRE_EXTRA_MATCH_LIMIT) != 0) return PCRE_ERROR_DFA_UMLIMIT;