Undefined Behavior¶
Rule ID¶
MI110
Definition¶
The software exhibits behavior that is undefined or unpredictable, often leading to a crash.
Example¶
See one of the applicable code examples from CWE.
1 2 3 4 5 |
|
In this example function, the memory address of variable b is derived by adding 1 to the address of variable a. This derived address is then used to assign the value 0 to b. Here, b may not be one byte past a. It may be one byte in front of a. Or, they may have three bytes between them because they are aligned on 32-bit boundaries.