SFP Secondary Cluster: Glitch in Computation
A category in the Common Weakness Enumeration published by The MITRE Corporation.
Categories in the Common Weakness Enumeration (CWE) group entries based on some common characteristic or attribute.
This category identifies Software Fault Patterns (SFPs) within the Glitch in Computation cluster (SFP1).
The code uses an operator for assignment when the intention was to perform a comparison.
The software sets a pointer to a specific address other than NULL or 0.
The program compares classes by name, which can cause it to use the wrong class when multiple classes can have the same name.
The product divides a value by zero.
The software contains an expression that will always evaluate to false.
The software contains an expression that will always evaluate to true.
The software calls a function, procedure, or routine, but the caller specifies an argument that is the wrong data type, which may lead to resultant weaknesses.
The software calls a function, procedure, or routine, but the caller specifies too many arguments, or too few arguments, which may lead to undefined behavior and resul...
The software calls a function, procedure, or routine, but the caller specifies the arguments in an incorrect order, leading to resultant weaknesses.
The software calls a function, procedure, or routine, but the caller specifies the wrong variable or reference as one of the arguments, which may lead to undefined beh...
The software calls a function, procedure, or routine, but the caller specifies an argument that contains the wrong value, which may lead to resultant weaknesses.
The product calls a function, procedure, or routine with arguments that are not correctly specified, leading to always-incorrect behavior and resultant weaknesses.
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...
In C and C++, one may often accidentally refer to the wrong memory due to the semantics of when math operations are implicitly scaled.
The software contains a conditional statement with multiple logical expressions in which one of the non-leading expressions may produce side effects. This may lead to ...
The software does not correctly convert an object, resource, or structure from one type to a different type.
The software 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 ...
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...
The application stores a non-serializable object as an HttpSession attribute, which can hurt reliability.
When the J2EE container attempts to write unserializable objects to disk there is no guarantee that the process will complete successfully.
The software does not initialize critical variables, which causes the execution environment to use unexpected values.
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion.
A function can return a pointer to memory that is outside of the buffer that the pointer is expected to reference.
A function returns the address of a stack variable, which will cause unintended program behavior, typically in the form of a crash.
The software 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 b...
The behavior of this function is undefined unless its control parameter is set to a specific value.
The software 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,...
The software uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value if the value of the unsigned primitive can not...
The programmer accidentally uses the wrong operator, which changes the application logic in security-relevant ways.
The application subtracts one pointer from another in order to determine size, but this calculation can be incorrect if the pointers do not exist in the same memory ch...
The code uses a variable that has not been initialized, leading to unpredictable or unintended results.
The product uses the wrong operator when comparing a string, such as using "==" when the equals() method should be used instead.
Wrap around errors occur whenever a value is incremented past the maximum value for its type and therefore "wraps around" to a very small, negative, or undefined value.
CWE identifiers in this view are associated with clusters of Software Fault Patterns (SFPs).