mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
fix(pathdb): use MaxInt instead of MaxUint32 for int overflow check
This commit is contained in:
parent
657c99f116
commit
4a582b6881
1 changed files with 1 additions and 1 deletions
|
|
@ -404,7 +404,7 @@ func decodeSingle(keySection []byte, onValue func([]byte, int, int) error) ([]st
|
||||||
keyOff += nn
|
keyOff += nn
|
||||||
|
|
||||||
// Validate that the values can fit in an int to prevent overflow on 32-bit systems
|
// Validate that the values can fit in an int to prevent overflow on 32-bit systems
|
||||||
if nShared > uint64(math.MaxUint32) || nUnshared > uint64(math.MaxUint32) || nValue > uint64(math.MaxUint32) {
|
if nShared > uint64(math.MaxInt) || nUnshared > uint64(math.MaxInt) || nValue > uint64(math.MaxInt) {
|
||||||
return nil, errors.New("key size too large")
|
return nil, errors.New("key size too large")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue