]> granicus.if.org Git - vim/commitdiff
patch 8.2.1265: crash with EXITFREE when split() fails v8.2.1265
authorBram Moolenaar <Bram@vim.org>
Tue, 21 Jul 2020 20:25:51 +0000 (22:25 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 21 Jul 2020 20:25:51 +0000 (22:25 +0200)
Problem:    Crash with EXITFREE when split() fails.
Solution:   Restore 'cpoptions'.

src/evalfunc.c
src/version.c

index 5de49c5d5f60a008063a773957d2522fb21c6168..c07b1ab77b3265826fcd6a526b32c059a5750acf 100644 (file)
@@ -7859,9 +7859,9 @@ f_split(typval_T *argvars, typval_T *rettv)
        pat = (char_u *)"[\\x01- ]\\+";
 
     if (rettv_list_alloc(rettv) == FAIL)
-       return;
+       goto theend;
     if (typeerr)
-       return;
+       goto theend;
 
     regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
     if (regmatch.regprog != NULL)
@@ -7898,6 +7898,7 @@ f_split(typval_T *argvars, typval_T *rettv)
        vim_regfree(regmatch.regprog);
     }
 
+theend:
     p_cpo = save_cpo;
 }
 
index 9b6f1b41a3e82f310f7f68240727f379af145883..d6d74346cea346221bfabf7d225e40df9ab6300c 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1265,
 /**/
     1264,
 /**/