Missing return value check in approve for approveToken function call #175
Labels
0 (Non-critical)
Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation
bug
Something isn't working
duplicate
This issue or pull request already exists
Handle
SolidityScan
Vulnerability details
Description
The Return value of the external call is never checked and therefore may have issues if the external call is not successful.
Impact
Missing return value validations may have varied impacts on the smart contract depending upon the function logic. The function in which the external call is being called may fail and give inconsistent results.
PoC
Proof of Concept
The function
approveToken
athttps://github.com/code-423n4/2022-01-notional/blob/main/contracts/TreasuryManager.sol#L78-L80
does not handle the return statement for the call
approve
.An
approve
call always returns true or false which is not handed in the function.Recommended Mitigation Steps
Ideally, it is recommended to store the return value of the external call and validate it to see if the call failed or succeeded.
The text was updated successfully, but these errors were encountered: