0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.3328: Coverity error for not checking return value

Problem:    Coverity error for not checking return value.
Solution:   Check value is not negative.
This commit is contained in:
Bram Moolenaar
2021-08-11 15:54:59 +02:00
parent ba9c23e776
commit b85d3627d9
2 changed files with 5 additions and 1 deletions

View File

@@ -1258,6 +1258,8 @@ read_compound(FILE *fd, slang_T *slang, int len)
gap = &slang->sl_comppat;
c = get2c(fd); // <comppatcount>
if (c < 0)
return SP_TRUNCERROR;
todo -= 2;
ga_init2(gap, sizeof(char_u *), c);
if (ga_grow(gap, c) == OK)

View File

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