This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "Code Correctness: null Argument to equals()"

From OWASP
Jump to: navigation, search
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:Vulnerability}}
+
{{template:CandidateForDeletion}}
{{Template:Fortify}}
 
  
==Abstract==
+
#REDIRECT [[Failure to follow guideline/specification]]
 +
 
 +
 
 +
 
 +
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
  
The expression obj.equals(null) should always be false.
 
  
 
==Description==
 
==Description==
 +
The expression obj.equals(null) should always be false.
  
 
The program uses the equals() method to compare an object with null. The contract of the equals() method requires this comparison to always return false[1].
 
The program uses the equals() method to compare an object with null. The contract of the equals() method requires this comparison to always return false[1].
 +
 +
==Risk Factors==
 +
TBD
  
 
==Examples ==
 
==Examples ==
 +
TBD
 +
 +
==Related [[Attacks]]==
 +
 +
* [[Attack 1]]
 +
* [[Attack 2]]
 +
  
==Related Threats==
+
==Related [[Vulnerabilities]]==
  
==Related Attacks==
+
* [[Vulnerability 1]]
 +
* [[Vulnerabiltiy 2]]
  
==Related Vulnerabilities==
 
  
==Related Countermeasures==
+
==Related [[Controls]]==
  
==Reference==
+
* [[Control 1]]
 +
* [[Control 2]]
  
[1] Sun JavaDoc for Object. http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)
 
  
==Categories==
+
==Related [[Technical Impacts]]==
  
[[Category:Code Quality Vulnerability]]
+
* [[Technical Impact 1]]
 +
* [[Technical Impact 2]]
  
[[Category:Implementation]]
 
  
[[Category:Java]]
+
==References==
 +
* Sun JavaDoc for Object. http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)

Latest revision as of 23:26, 7 April 2009

Template:CandidateForDeletion

#REDIRECT Failure to follow guideline/specification


Last revision (mm/dd/yy): 04/7/2009


Description

The expression obj.equals(null) should always be false.

The program uses the equals() method to compare an object with null. The contract of the equals() method requires this comparison to always return false[1].

Risk Factors

TBD

Examples

TBD

Related Attacks


Related Vulnerabilities


Related Controls


Related Technical Impacts


References