Open code423n4 opened 3 years ago
gpersoon
The enum FailureInfo in ErrorReporter.sol has a comment that the values are sorted in alphabetical order. However they are not in alphabetical order
ErrorReporter.sol: enum FailureInfo { ACCEPT_ADMIN_PENDING_ADMIN_CHECK, ... BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, ... TRANSFER_TOO_MUCH, ADD_RESERVES_ACCRUE_INTEREST_FAILED, ADD_RESERVES_FRESH_CHECK, ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE }
Editor
Sort the enum values in alphabetical order or remove the comment.
Added to backlog, thanks!
Handle
gpersoon
Vulnerability details
Impact
The enum FailureInfo in ErrorReporter.sol has a comment that the values are sorted in alphabetical order. However they are not in alphabetical order
Proof of Concept
ErrorReporter.sol: enum FailureInfo { ACCEPT_ADMIN_PENDING_ADMIN_CHECK, ... BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, ... TRANSFER_TOO_MUCH, ADD_RESERVES_ACCRUE_INTEREST_FAILED, ADD_RESERVES_FRESH_CHECK, ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE }
Tools Used
Editor
Recommended Mitigation Steps
Sort the enum values in alphabetical order or remove the comment.