Weakness (CWE)
CWE-192: Integer Coercion Error
Variant Incomplete
Integer coercion refers to a set of flaws pertaining to the type casting, extension, or truncation of primitive data types.
How to prevent it (3 mitigations)
-
Requirements
A language which throws exceptions on ambiguous data casts might be chosen.
-
Architecture and Design
Design objects and program flow such that multiple or complex casts are unnecessary
-
Implementation
Ensure that any data type casting that you must use is entirely understood in order to reduce the plausibility of error in use.
Source: MITRE CWE-192
0 results · Clear filters · Feed
Nothing found.