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:
@@ -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)
|
||||
|
@@ -755,6 +755,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
3328,
|
||||
/**/
|
||||
3327,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user