mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim-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.
b85d3627d9
This commit is contained in:
parent
2cbbab28d2
commit
17f377b6f9
@ -1371,6 +1371,9 @@ static int 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_init(gap, sizeof(char_u *), c);
|
||||
ga_grow(gap, c);
|
||||
|
Loading…
Reference in New Issue
Block a user