mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 7.4.800
Problem: Using freed memory when triggering CmdUndefined autocommands. Solution: Set pointer to NULL. (Dominique Pelle)
This commit is contained in:
@@ -2365,8 +2365,9 @@ do_one_cmd(cmdlinep, sourcing,
|
|||||||
p = vim_strnsave(ea.cmd, (int)(p - ea.cmd));
|
p = vim_strnsave(ea.cmd, (int)(p - ea.cmd));
|
||||||
ret = apply_autocmds(EVENT_CMDUNDEFINED, p, p, TRUE, NULL);
|
ret = apply_autocmds(EVENT_CMDUNDEFINED, p, p, TRUE, NULL);
|
||||||
vim_free(p);
|
vim_free(p);
|
||||||
if (ret && !aborting())
|
/* If the autocommands did something and didn't cause an error, try
|
||||||
p = find_command(&ea, NULL);
|
* finding the command again. */
|
||||||
|
p = (ret && !aborting()) ? find_command(&ea, NULL) : NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -741,6 +741,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 */
|
||||||
|
/**/
|
||||||
|
800,
|
||||||
/**/
|
/**/
|
||||||
799,
|
799,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user