0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.3.039

Problem:    Crash when using skk.vim plugin.
Solution:   Get length of expression evaluation result only after checking for
            NULL.  (Noriaki Yagi, Dominique Pelle)
This commit is contained in:
Bram Moolenaar 2010-10-27 12:58:23 +02:00
parent 264e9fd61b
commit fc3c83e47e
2 changed files with 19 additions and 14 deletions

View File

@ -688,9 +688,11 @@ getcmdline(firstc, count, indent)
p = get_expr_line();
--textlock;
restore_cmdline(&save_ccline);
len = (int)STRLEN(p);
if (p != NULL && realloc_cmdbuff(len + 1) == OK)
if (p != NULL)
{
len = (int)STRLEN(p);
if (realloc_cmdbuff(len + 1) == OK)
{
ccline.cmdlen = len;
STRCPY(ccline.cmdbuff, p);
@ -708,6 +710,7 @@ getcmdline(firstc, count, indent)
goto cmdline_changed;
}
}
}
beep_flush();
c = ESC;
}

View File

@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
39,
/**/
38,
/**/