]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.0.0565: using freed memory in :caddbuf v8.0.0565
authorBram Moolenaar <Bram@vim.org>
Sat, 15 Apr 2017 13:22:52 +0000 (15:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 15 Apr 2017 13:22:52 +0000 (15:22 +0200)
Problem:    Using freed memory in :caddbuf after clearing quickfix list.
            (Dominique Pelle)
Solution:   Set qf_last to NULL.

src/quickfix.c
src/version.c

index 58fcd110111d479628f97931e96c1808ca31e676..d2921b21c6a8daa75a48e539ae630c31023be9ed 100644 (file)
@@ -2750,6 +2750,7 @@ qf_free(qf_info_T *qi, int idx)
     vim_free(qi->qf_lists[idx].qf_title);
     qi->qf_lists[idx].qf_title = NULL;
     qi->qf_lists[idx].qf_index = 0;
+    qi->qf_lists[idx].qf_last = NULL;
 
     qf_clean_dir_stack(&qi->qf_dir_stack);
     qi->qf_directory = NULL;
index 048953d38f0df0c51fe7d0e0828e1a0ed71fb19e..a68b999d66bb3c3bc55486f0ccd16d7baebcf368 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    565,
 /**/
     564,
 /**/