summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-15 20:49:41 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-15 20:49:41 +0100
commitca359cbedd0d603124776e7a6ca0ae79ffc34cdc (patch)
tree0af5edfdebeb456661c37910540212d28b95a74c
parent6a07644db30cb5f3d0c6dc5eb2c348b6289da553 (diff)
patch 8.2.1991: Coverity warns for not using the ga_grow() return valuev8.2.1991
Problem: Coverity warns for not using the ga_grow() return value. Solution: Bail out if ga_grow() fails. (Yegappan Lakshmanan, closes #7303)
-rw-r--r--src/getchar.c6
-rw-r--r--src/version.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 3d73a6c7b6..165a6a3ad7 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -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)
{
diff --git a/src/version.c b/src/version.c
index 5978bdce54..4f03b2627c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1991,
+/**/
1990,
/**/
1989,