mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0309: Missing out-of-memory check to may_get_cmd_block()
Problem: Missing out-of-memory check to may_get_cmd_block() Solution: Return p unchanged in case of out-of-memory (John Marriott) closes: #19906 Signed-off-by: John Marriott <basilisk@internode.on.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f1dbca200c
commit
4368ad34df
@@ -1240,6 +1240,8 @@ may_get_cmd_block(exarg_T *eap, char_u *p, char_u **tofree, int *flags)
|
||||
}
|
||||
vim_free(line);
|
||||
retp = *tofree = ga_concat_strings(&ga, "\n");
|
||||
if (retp == NULL)
|
||||
retp = p;
|
||||
ga_clear_strings(&ga);
|
||||
*flags |= UC_VIM9;
|
||||
}
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
309,
|
||||
/**/
|
||||
308,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user