CWE-595: Comparison of Object References Instead of Object Contents

ID CWE-595
Abstraction Variant
Structure Simple
Status Incomplete
The product compares object references instead of the contents of the objects themselves, preventing it from detecting equivalent objects.

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 values.

Modes of Introduction

Phase Note
Implementation

Applicable Platforms

Type Class Name Prevalence
Language Java
Language JavaScript
Language PHP
Language Not Language-Specific

Relationships

View Weakness
# ID View Status # ID Name Abstraction Structure Status
CWE-1000 Research Concepts Draft CWE-1025 Comparison Using Wrong Factors Base Simple Incomplete
Loading...
Loading...