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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user