mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -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;
|
gap = &slang->sl_comppat;
|
||||||
c = get2c(fd); // <comppatcount>
|
c = get2c(fd); // <comppatcount>
|
||||||
|
if (c < 0)
|
||||||
|
return SP_TRUNCERROR;
|
||||||
todo -= 2;
|
todo -= 2;
|
||||||
ga_init2(gap, sizeof(char_u *), c);
|
ga_init2(gap, sizeof(char_u *), c);
|
||||||
if (ga_grow(gap, c) == OK)
|
if (ga_grow(gap, c) == OK)
|
||||||
|
@@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3328,
|
||||||
/**/
|
/**/
|
||||||
3327,
|
3327,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user