...
Automated detection of integer operations that can potentially overflow is straightforward. Automatic determination of which potential overflows are true errors and which are intended by the programmer is infeasible. Heuristic warnings might be helpful.
Tool | Version | Checker | Description |
---|---|---|---|
Coverity | 7.5 | BAD_SHIFT OVERFLOW_BEFORE_WIDEN | Implemented |
Related Guidelines
INT32-C. Ensure that operations on signed integers do not result in overflow | |
VOID INT32-CPP. Ensure that operations on signed integers do not result in overflow | |
Wrap-around Error [XYY] | |
CWE-682. Incorrect calculation | |
| CWE-190. Integer overflow or wraparound |
| CWE-191. Integer underflow (wrap or wraparound) |
...