1280
Example Language: C (Bad)
char* getName() {
char name[STR_MAX];
fillInName(name);
return name;
}
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 748 CERT C Secure Coding Standard (2008) Appendix -
POSIX (POS)
734 2351
MemberOf 998 SFP Secondary Cluster: Glitch in Computation 888 2419
MemberOf 1156 SEI CERT C Coding Standard - Guidelines 02.
Declarations and Initialization (DCL)
1154 2455
MemberOf 1306 CISQ Quality Measures - Reliability 1305 2483
MemberOf 1340 CISQ Data Protection Measures 1340 2590
MemberOf 1399 Comprehensive Categorization: Memory Safety 1400 2525
Taxonomy Mappings
Mapped Taxonomy Name Node ID Fit Mapped Node Name
CERT C Secure Coding DCL30-C CWE More Specific Declare objects with appropriate
storage durations
CERT C Secure Coding POS34-
C
Do not call putenv() with a pointer to an
automatic variable as the argument
Software Fault Patterns SFP1 Glitch in computation
CWE-563: Assignment to Variable without Use
Weakness ID : 563
Structure : Simple
Abstraction : Base
Description
The variable's value is assigned but never used, making it a dead store.
Extended Description
After the assignment, the variable is either assigned another value or goes out of scope. It is likely
that the variable is simply vestigial, but it is also possible that the unused variable points out a bug.
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.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 1164 Irrelevant Code 1967
Relevant to the view "Software Development" (CWE-699)
CWE Version 4.14
CWE-563: Assignment to Variable without Use
CWE-563: Assignment to Variable without Use