1946
Common Consequences
Scope Impact Likelihood
Other Reduce Maintainability
Demonstrative Examples
Example 1:
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.
Example Language: C (Bad)
void example() {
char a;
char b;
*(&a + 1) = 0;
}
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.
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 1412 Comprehensive Categorization: Poor Coding Practices 1400 2538
References
[REF-963]Robert A. Martin and Lawrence H. Shafer. "Providing a Framework for
Effective Software Quality Assessment". 1996 July. < https://www.researchgate.net/
publication/285403022_PROVIDING_A_FRAMEWORK_FOR_EFFECTIVE_SOFTWARE_QUALITY_MEASUREMENT_>.2023-04-07.
CWE-1106: Insufficient Use of Symbolic Constants
Weakness ID : 1106
Structure : Simple
Abstraction : Base
Description
The source code uses literal constants that may need to change or evolve over time, instead of
using symbolic constants.
Extended Description
This issue makes it more difficult to maintain the product, which indirectly affects security by
making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it
easier to introduce vulnerabilities.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
CWE Version 4.14
CWE-1107: Insufficient Isolation of Symbolic Constant Definitions
CWE-1107: Insufficient Isolation of Symbolic Constant Definitions