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:
parent
264e9fd61b
commit
fc3c83e47e
@ -688,24 +688,27 @@ getcmdline(firstc, count, indent)
|
|||||||
p = get_expr_line();
|
p = get_expr_line();
|
||||||
--textlock;
|
--textlock;
|
||||||
restore_cmdline(&save_ccline);
|
restore_cmdline(&save_ccline);
|
||||||
len = (int)STRLEN(p);
|
|
||||||
|
|
||||||
if (p != NULL && realloc_cmdbuff(len + 1) == OK)
|
if (p != NULL)
|
||||||
{
|
{
|
||||||
ccline.cmdlen = len;
|
len = (int)STRLEN(p);
|
||||||
STRCPY(ccline.cmdbuff, p);
|
if (realloc_cmdbuff(len + 1) == OK)
|
||||||
vim_free(p);
|
{
|
||||||
|
ccline.cmdlen = len;
|
||||||
|
STRCPY(ccline.cmdbuff, p);
|
||||||
|
vim_free(p);
|
||||||
|
|
||||||
/* Restore the cursor or use the position set with
|
/* Restore the cursor or use the position set with
|
||||||
* set_cmdline_pos(). */
|
* set_cmdline_pos(). */
|
||||||
if (new_cmdpos > ccline.cmdlen)
|
if (new_cmdpos > ccline.cmdlen)
|
||||||
ccline.cmdpos = ccline.cmdlen;
|
ccline.cmdpos = ccline.cmdlen;
|
||||||
else
|
else
|
||||||
ccline.cmdpos = new_cmdpos;
|
ccline.cmdpos = new_cmdpos;
|
||||||
|
|
||||||
KeyTyped = FALSE; /* Don't do p_wc completion. */
|
KeyTyped = FALSE; /* Don't do p_wc completion. */
|
||||||
redrawcmd();
|
redrawcmd();
|
||||||
goto cmdline_changed;
|
goto cmdline_changed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
beep_flush();
|
beep_flush();
|
||||||
|
@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
39,
|
||||||
/**/
|
/**/
|
||||||
38,
|
38,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user