Package: vim / 2:8.0.0197-4+deb9u1

upstream/patch-8.0.0706-crash-when-cancelling-the-cmdline-window-i.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Bram Moolenaar <Bram@vim.org>
Date: Tue, 11 Jul 2017 15:11:57 +0200
Subject: patch 8.0.0706: crash when cancelling the cmdline window in Ex mode

Problem:    Crash when cancelling the cmdline window in Ex mode. (James McCoy)
Solution:   Do not set cmdbuff to NULL, make it empty.
---
 src/ex_getln.c | 6 ++++++
 src/version.c  | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/src/ex_getln.c b/src/ex_getln.c
index 581c444..f0a4329 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -7003,7 +7003,13 @@ ex_window(void)
 	else
 	    ccline.cmdbuff = vim_strsave(ml_get_curline());
 	if (ccline.cmdbuff == NULL)
+	{
+	    ccline.cmdbuff = vim_strsave((char_u *)"");
+	    ccline.cmdlen = 0;
+	    ccline.cmdbufflen = 1;
+	    ccline.cmdpos = 0;
 	    cmdwin_result = Ctrl_C;
+	}
 	else
 	{
 	    ccline.cmdlen = (int)STRLEN(ccline.cmdbuff);
diff --git a/src/version.c b/src/version.c
index 6781ef2..6986625 100644
--- a/src/version.c
+++ b/src/version.c
@@ -771,6 +771,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    706,
+/**/
     703,
 /**/
     550,