Array Boundary Check Vulnerability in updateFee Function
In the updateFee function, there is a lack of array boundary check after deleting the last fee item. This may lead to out-of-bounds array access in subsequent operations.
When feeBasisPoints is 0, the function deletes the fee item at the specified index. However, after the deletion, the function does not re-verify if _index is still within the array bounds. This could result in accessing non-existent array elements after the array length has been reduced.
May cause unexpected array access or function reversion.
Could lead to inconsistent contract state in some cases.
Might be exploited by malicious users to disrupt normal contract operations.
vscode
Add an additional check after updating or deleting fee items to ensure the index is still within valid range.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.