internal/ethapi: avoid int overflow in GetTransactionReceipt (#26911)

This commit is contained in:
Darioush Jalali 2023-03-16 15:53:39 -07:00 committed by GitHub
parent d8066dcde8
commit f733657383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]