...
Code Block | ||
---|---|---|
| ||
for (int val = -1; val != 0; val <<= 1) { /* ... */ } |
Exceptions
EX1: Depending on the functionality, integer overflow may be benign. For instance, the Object.hashcode()
method may return all representable values of type int
.
Risk Assessment
Failure to perform explicit range checking can lead to integer overflows causing unexpected program control flow or unanticipated program behavior.
...