0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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)
{