vim-patch:7.4.800

Problem:    Using freed memory when triggering CmdUndefined autocommands.
Solution:   Set pointer to NULL. (Dominique Pelle)

829aef1eb4
This commit is contained in:
Jurica Bradaric 2016-02-02 18:34:04 +01:00
parent ffd143be82
commit cdc7250cd8
2 changed files with 4 additions and 4 deletions

View File

@ -1702,9 +1702,9 @@ static char_u * do_one_cmd(char_u **cmdlinep,
p = vim_strnsave(ea.cmd, p - ea.cmd);
int ret = apply_autocmds(EVENT_CMDUNDEFINED, p, p, TRUE, NULL);
xfree(p);
if (ret && !aborting()) {
p = find_command(&ea, NULL);
}
// If the autocommands did something and didn't cause an error, try
// finding the command again.
p = (ret && !aborting()) ? find_command(&ea, NULL) : NULL;
}
if (p == NULL) {

View File

@ -488,7 +488,7 @@ static int included_patches[] = {
803,
802,
// 801,
// 800,
800,
799,
798,
// 797,