]> granicus.if.org Git - vim/commitdiff
patch 8.2.4236: accessing freed memory v8.2.4236
authorBram Moolenaar <Bram@vim.org>
Thu, 27 Jan 2022 21:56:40 +0000 (21:56 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 27 Jan 2022 21:56:40 +0000 (21:56 +0000)
Problem:    Accessing freed memory.
Solution:   Set the bh_curr pointer to NULL.

src/getchar.c
src/version.c

index 6602eeac53636fb9f62f08b678d9d8ad3e7abe8e..cb8a3544896fb613578f2a5bdf1b096ea0bde205 100644 (file)
@@ -110,6 +110,7 @@ free_buff(buffheader_T *buf)
        vim_free(p);
     }
     buf->bh_first.b_next = NULL;
+    buf->bh_curr = NULL;
 }
 
 /*
index 49942b5e0237a9b54faddd7c4a591007df9d1245..23b29daf30f0589506eef31c56fcdbc8241e455a 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4236,
 /**/
     4235,
 /**/