mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
triedb/pathdb: catch int conversion overflow in 32-bit
This commit is contained in:
parent
b87581f297
commit
14c59592fa
1 changed files with 1 additions and 1 deletions
|
|
@ -524,7 +524,7 @@ func newSingleTrienodeHistoryReader(id uint64, reader ethdb.AncientReader, keyRa
|
||||||
}
|
}
|
||||||
keyStart := int(keyRange.start)
|
keyStart := int(keyRange.start)
|
||||||
keyLimit := int(keyRange.limit)
|
keyLimit := int(keyRange.limit)
|
||||||
if keyLimit == math.MaxUint32 {
|
if keyRange.limit == math.MaxUint32 {
|
||||||
keyLimit = len(keyData)
|
keyLimit = len(keyData)
|
||||||
}
|
}
|
||||||
if len(keyData) < keyStart || len(keyData) < keyLimit {
|
if len(keyData) < keyStart || len(keyData) < keyLimit {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue