Closed c4-submissions closed 1 year ago
https://github.com/code-423n4/2023-09-delegate/blob/a6dbac8068760ee4fc5bababb57e3fe79e5eeb2e/src/DelegateToken.sol#L361
1.Delete function value of that index is removed and replaced by "0" and array size remains same and this lead to erroneous business logic and cause improper results.
1.Manual audit and solidity visual developer
use push and pop functions to interact with array elements. EXAMPLE CODE :
function remove(uint _index) public { for (uint i = _index; i < arr.length - 1;i++) { arr[i] = arr[i + 1]; } arr.pop(); }
Other
GalloDaSballo marked the issue as unsatisfactory: Insufficient proof
They are clearing a value on a fixed length array
Lines of code
https://github.com/code-423n4/2023-09-delegate/blob/a6dbac8068760ee4fc5bababb57e3fe79e5eeb2e/src/DelegateToken.sol#L361
Vulnerability details
Impact
1.Delete function value of that index is removed and replaced by "0" and array size remains same and this lead to erroneous business logic and cause improper results.
Proof of Concept
Tools Used
1.Manual audit and solidity visual developer
Recommended Mitigation Steps
use push and pop functions to interact with array elements. EXAMPLE CODE :
Assessed type
Other