# HG changeset patch # User Christian Brabandt # Date 1499778903 -7200 # Node ID aa426eb9589da2a549b7df58e64ebbe6a2cda74b # Parent 6b272e247ffe23c6fc6adf370e3191858db949b3 patch 8.0.0706: crash when cancelling the cmdline window in Ex mode commit https://github.com/vim/vim/commit/5a15b6aa0aa5c1559c6f1a9f06c595a8c564637d Author: Bram Moolenaar Date: Tue Jul 11 15:11:57 2017 +0200 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. diff --git a/src/ex_getln.c b/src/ex_getln.c --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -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); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 706, +/**/ 705, /**/ 704,