From 1a2338bbad3f3832d739195b8375a491e0560dd3 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Thu, 18 Sep 2014 20:06:17 +0900 Subject: [PATCH] vim-patch:7.4.379 Problem: Accessing freed memory after using setqflist(list, 'r'). (Lcd) Solution: Reset qf_index. https://code.google.com/p/vim/source/detail?r=v7-4-379 --- src/nvim/quickfix.c | 1 + src/nvim/version.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index ce2a80adaa..3bc70b6b41 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -1890,6 +1890,7 @@ static void qf_free(qf_info_T *qi, int idx) } free(qi->qf_lists[idx].qf_title); qi->qf_lists[idx].qf_title = NULL; + qi->qf_lists[idx].qf_index = 0; } /* diff --git a/src/nvim/version.c b/src/nvim/version.c index fa96b27341..b6597215e9 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -216,7 +216,7 @@ static int included_patches[] = { //382, //381, //380 NA - //379, + 379, //378, //377, 376,