Skip to content

Commit 24bba17

Browse files
committed
Fixed uint64 to int64 unchecked cast
1 parent 1c12426 commit 24bba17

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

vindex/map.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ func (b *VerifiableIndex) Lookup(ctx context.Context, key [sha256.Size]byte) (ap
435435
}
436436

437437
// Verify the proof. Not strictly required, but good to be robust while this code is new.
438+
if size > math.MaxInt64 {
439+
return result, fmt.Errorf("size %d exceeds MaxInt64", size)
440+
}
438441
snap := mpt.Snapshot{
439442
Version: int64(size),
440443
Hash: mapRoot,

0 commit comments

Comments
 (0)