First Flight #12: Kitty Connect

First Flight #12: Kitty Connect
Beginner FriendlyFoundryNFTGameFi
100 EXP
View results
Submission Details
Severity: high
Invalid

`KittyConnect::CatInfo.idx` is wrongly set, causing problems when handling tokens

Summary

The KittyConnect::CatInfo.idx is been set to the length of the array instead of length - 1.

Vulnerability Details

Since arrays is Solidity are 0-indexed, the last index of an array is length - 1. Assigning the length of the array to idx field can potentially cause errors when transferring or bridging tokens.

Impact

This can potentially prevent transferring or bridging tokens.

Tools Used

Manual review.

Recommendations

Assign length - 1 to the idx field.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.