Skip to content

Commit ca359cb

Browse files
committed
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)
1 parent 6a07644 commit ca359cb

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/getchar.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3645,7 +3645,11 @@ getcmdkeycmd(
36453645
got_int = FALSE;
36463646
while (c1 != NUL && !aborted)
36473647
{
3648-
ga_grow(&line_ga, 32);
3648+
if (ga_grow(&line_ga, 32) != OK)
3649+
{
3650+
aborted = TRUE;
3651+
break;
3652+
}
36493653

36503654
if (vgetorpeek(FALSE) == NUL)
36513655
{

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
1991,
753755
/**/
754756
1990,
755757
/**/

0 commit comments

Comments
 (0)