1
0
forked from aniani/vim

patch 8.2.1991: Coverity warns for not using the ga_grow() return value

Problem:    Coverity warns for not using the ga_grow() return value.
Solution:   Bail out if ga_grow() fails. (Yegappan Lakshmanan, closes #7303)
This commit is contained in:
Bram Moolenaar 2020-11-15 20:49:41 +01:00
parent 6a07644db3
commit ca359cbedd
2 changed files with 7 additions and 1 deletions

View File

@ -3645,7 +3645,11 @@ getcmdkeycmd(
got_int = FALSE;
while (c1 != NUL && !aborted)
{
ga_grow(&line_ga, 32);
if (ga_grow(&line_ga, 32) != OK)
{
aborted = TRUE;
break;
}
if (vgetorpeek(FALSE) == NUL)
{

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1991,
/**/
1990,
/**/