From 175692325bfeea280b105951949e71a5a4b430d1 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 28 Jan 2022 09:33:37 +0100 Subject: [PATCH] vim-patch:8.2.4236: accessing freed memory Problem: Accessing freed memory. Solution: Set the bh_curr pointer to NULL. https://github.com/vim/vim/commit/166788c657f4b1090a31ea37a023b1f2c78790c8 --- src/nvim/getchar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index e3c338c500..55bcfa0e97 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -163,6 +163,7 @@ void free_buff(buffheader_T *buf) xfree(p); } buf->bh_first.b_next = NULL; + buf->bh_curr = NULL; } /// Return the contents of a buffer as a single string.