]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.623 v7.4.623
authorBram Moolenaar <Bram@vim.org>
Tue, 10 Feb 2015 17:18:17 +0000 (18:18 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 10 Feb 2015 17:18:17 +0000 (18:18 +0100)
Problem:    Crash with pattern: \(\)\{80000}  (Dominique Pelle)
Solution:   When the max limit is large fall back to the old engine.

src/regexp_nfa.c
src/version.c

index 77c78705626bba714380bb2ff17f35d767237b57..2245351095b012055daf22944699598e5b61b888 100644 (file)
@@ -2034,9 +2034,10 @@ nfa_regpiece()
            }
 
            /* The engine is very inefficient (uses too many states) when the
-            * maximum is much larger than the minimum.  Bail out if we can
-            * use the other engine. */
-           if ((nfa_re_flags & RE_AUTO) && maxval > minval + 200)
+            * maximum is much larger than the minimum and when the maximum is
+            * large.  Bail out if we can use the other engine. */
+           if ((nfa_re_flags & RE_AUTO)
+                                  && (maxval > minval + 200 || maxval > 500))
                return FAIL;
 
            /* Ignore previous call to nfa_regatom() */
@@ -4254,7 +4255,6 @@ state_in_list(l, state, subs)
  * Add "state" and possibly what follows to state list ".".
  * Returns "subs_arg", possibly copied into temp_subs.
  */
-
     static regsubs_T *
 addstate(l, state, subs_arg, pim, off)
     nfa_list_T         *l;         /* runtime state list */
@@ -4392,6 +4392,7 @@ skip_add:
                    subs = &temp_subs;
                }
 
+               /* TODO: check for vim_realloc() returning NULL. */
                l->t = vim_realloc(l->t, newlen * sizeof(nfa_thread_T));
                l->len = newlen;
            }
index 4116c723306ba7f053e8258190b5becff5cb67ff..b52926a369d91117a52ce5477162323ffc7d8979 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    623,
 /**/
     622,
 /**/