CWE-595

Overview
  • CWE ID
  • 595
  • CWE Name
  • Comparison of Object References Instead of Object Contents
  • CWE Abstraction
  • Variant
  • CWE structure
  • Simple
  • CWE Status
  • Incomplete
Description
The program compares object references instead of the contents of the objects themselves, preventing it from detecting equivalent objects.
Extended Description
For example, in Java, comparing objects using == usually produces deceptive results, since the == operator compares object references rather than values; often, this means that using == for strings is actually comparing the strings' references, not their
Related CWEs
CWE ID View ID Nature Ordinal
1025 1000 ChildOf Primary
Related CVEs