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

pull/26917/head
Darioush Jalali 2 years ago committed by GitHub
parent d8066dcde8
commit f733657383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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]

Loading…
Cancel
Save