Permalink
Browse files

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.
  • Loading branch information...
brammool committed Jul 11, 2017
1 parent cae24be commit 5a15b6aa0aa5c1559c6f1a9f06c595a8c564637d
Showing with 8 additions and 0 deletions.
  1. +6 −0 src/ex_getln.c
  2. +2 −0 src/version.c
View
@@ -7042,7 +7042,13 @@ open_cmdwin(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);
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
706,
/**/
705,
/**/

0 comments on commit 5a15b6a

Please sign in to comment.