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