From 4a582b68816b7ab291f95a219e1f2eaeda3eceb3 Mon Sep 17 00:00:00 2001 From: David Klank <155117116+davidjsonn@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:59:16 +0200 Subject: [PATCH] fix(pathdb): use MaxInt instead of MaxUint32 for int overflow check --- triedb/pathdb/history_trienode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/triedb/pathdb/history_trienode.go b/triedb/pathdb/history_trienode.go index 1004106af9..3c0e087040 100644 --- a/triedb/pathdb/history_trienode.go +++ b/triedb/pathdb/history_trienode.go @@ -404,7 +404,7 @@ func decodeSingle(keySection []byte, onValue func([]byte, int, int) error) ([]st keyOff += nn // 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") }