Home / Vulnerability Database / Solidity : Non-strict comparison with zero
Solidity
Solidity : Non-strict comparison with zero
Overview
Variables of uint type cannot be negative. Thus, comparing uint variable with zero (greater than or equal) is redundant. Also, it may lead to an underflow issue. Moreover, comparison with zero used in for-loop condition results in an infinite loop.
References
MEDIUM
DerScanner Severity Score
Do you want to fix Solidity : Non-strict comparison with zero in your application?
See also
Solidity
Solidity : Return value of transfer, transferFrom, or approve function of ERC-20 standard is always false.
Solidity
Solidity : Using approve function of the ERC-20 token standard
Solidity
