From f73365738309d9b3249efca9c1492856bf6e7848 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Thu, 16 Mar 2023 15:53:39 -0700 Subject: [PATCH] internal/ethapi: avoid int overflow in GetTransactionReceipt (#26911) --- internal/ethapi/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 93a2d1264..0cf29e5fe 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1626,7 +1626,7 @@ func (s *TransactionAPI) GetTransactionReceipt(ctx context.Context, hash common. if err != nil { return nil, err } - if len(receipts) <= int(index) { + if uint64(len(receipts)) <= index { return nil, nil } receipt := receipts[index]