]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.913 v7.3.913
authorBram Moolenaar <Bram@vim.org>
Wed, 24 Apr 2013 13:39:11 +0000 (15:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 24 Apr 2013 13:39:11 +0000 (15:39 +0200)
Problem:    Still a crash when writing viminfo.
Solution:   Add checks for NULL pointers. (Ron Aaron)

src/ex_getln.c
src/version.c

index 740cca204854daeb5b3cd011b7d784f197e8d058..9fdb3771263c11192e74d75ef32fb91ab2114fb3 100644 (file)
@@ -6177,6 +6177,7 @@ finish_viminfo_history()
        }
        vim_free(viminfo_history[type]);
        viminfo_history[type] = NULL;
+       viminfo_hisidx[type] = 0;
     }
 }
 
@@ -6230,6 +6231,7 @@ write_viminfo_history(fp)
                        && !(round == 2 && i >= viminfo_hisidx[type]))
                {
                    p = round == 1 ? history[type][i].hisstr
+                                  : viminfo_history[type] == NULL ? NULL
                                                   : viminfo_history[type][i];
                    if (p != NULL && (round == 2 || !history[type][i].viminfo))
                    {
@@ -6261,7 +6263,8 @@ write_viminfo_history(fp)
                }
        }
        for (i = 0; i < viminfo_hisidx[type]; ++i)
-           vim_free(viminfo_history[type][i]);
+           if (viminfo_history[type] != NULL)
+               vim_free(viminfo_history[type][i]);
        vim_free(viminfo_history[type]);
        viminfo_history[type] = NULL;
        viminfo_hisidx[type] = 0;
index be992bf21743c3ce5a0285eabefada701c22bbad..bc36d412ef1514ce315cbd052dc519d194ad74e3 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    913,
 /**/
     912,
 /**/