mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
lint
This commit is contained in:
parent
4af6c60826
commit
06a96df510
@ -1571,8 +1571,9 @@ spell_read_tree (
|
|||||||
// The tree size was computed when writing the file, so that we can
|
// The tree size was computed when writing the file, so that we can
|
||||||
// allocate it as one long block. <nodecount>
|
// allocate it as one long block. <nodecount>
|
||||||
long len = get4c(fd);
|
long len = get4c(fd);
|
||||||
if (len < 0)
|
if (len < 0) {
|
||||||
return SP_TRUNCERROR;
|
return SP_TRUNCERROR;
|
||||||
|
}
|
||||||
if ((size_t)len >= SIZE_MAX / sizeof(int)) {
|
if ((size_t)len >= SIZE_MAX / sizeof(int)) {
|
||||||
// Invalid length, multiply with sizeof(int) would overflow.
|
// Invalid length, multiply with sizeof(int) would overflow.
|
||||||
return SP_FORMERROR;
|
return SP_FORMERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user