1869
Weakness ID : 1025
Structure : Simple
Abstraction : Base
Description
The code performs a comparison between two entities, but the comparison examines the
wrong factors or characteristics of the entities, which can lead to incorrect results and resultant
weaknesses.
Extended Description
This can lead to incorrect results and resultant weaknesses. For example, the code might
inadvertently compare references to objects, instead of the relevant contents of those objects,
causing two "equal" objects to be considered unequal.
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 697 Incorrect Comparison 1530
ParentOf 486 Comparison of Classes by Name 1164
ParentOf 595 Comparison of Object References Instead of Object
Contents