SEI CERT C Coding Standard - Guidelines 04. Integers (INT)
A category in the Common Weakness Enumeration published by The MITRE Corporation.
Summary
Categories in the Common Weakness Enumeration (CWE) group entries based on some common characteristic or attribute.
Weaknesses in this category are related to the rules and recommendations in the Integers (INT) section of the SEI CERT C Coding Standard.
Weaknesses
The product sets a pointer to a specific address other than NULL or 0.
The product divides a value by zero.
The product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management.
The product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.
When converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. If the resulting va...
The product does not correctly convert an object, resource, or structure from one type to a different type.
Integer coercion refers to a set of flaws pertaining to the type casting, extension, or truncation of primitive data types.
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the o...
The product performs a calculation to determine how much memory to allocate, but an integer overflow can occur that causes less memory to be allocated than expected, l...
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the co...
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion.
The product uses an API function, data structure, or other entity in a way that relies on properties that are not always guaranteed to hold for that entity.
The product uses a signed primitive and performs a cast to an unsigned primitive, which can produce an unexpected value if the value of the signed primitive can not be...
The product performs an operation on a number that causes it to be sign extended when it is transformed into a larger data type. When the original number is negative, ...
Concepts
CWE entries in this view (graph) are fully or partially eliminated by following the guidance presented in the online wiki that reflects that current rules and recommen...
See Also
- SEI CERT C Coding Standard : Rule 04. Integers (INT)
The Software Engineering Institute
- SEI CERT C Coding Standard : Rec. 04. Integers (INT)
The Software Engineering Institute
Common Weakness Enumeration content on this website is copyright of The MITRE Corporation unless otherwise specified. Use of the Common Weakness Enumeration and the associated references on this website are subject to the Terms of Use as specified by The MITRE Corporation.