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 "Dead Code: Unused Field"

From OWASP
Jump to: navigation, search
(Reverting to last version not containing links to www.texteltchile.com)
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
  #REDIRECT [[Failure to follow guideline/specification]]
 
  #REDIRECT [[Failure to follow guideline/specification]]
  
__TOC__
 
 
[[ASDR Table of Contents]]
 
  
  

Latest revision as of 18:28, 27 May 2009

Template:CandidateForDeletion

#REDIRECT Failure to follow guideline/specification


Last revision (mm/dd/yy): 05/27/2009

Description

This field is never accessed, except perhaps by dead code. It is likely that the field is simply vestigial, but it is also possible that the unused field points out a bug.


Risk Factors

  • Talk about the factors that make this vulnerability likely or unlikely to actually happen
  • Discuss the technical impact of a successful exploit of this vulnerability
  • Consider the likely [business impacts] of a successful attack


Examples

Example 1

The field named glue is not used in the following class. The author of the class has accidentally put quotes around the field name, transforming it into a string constant.

	public class Dead {
	
	  String glue;
	
	  public String getGlue() {
		return "glue";
	  }
	
	}

Example 2

The field named glue is used in the following class, but only from a method that is never called.

	public class Dead {
	
	  String glue;
	
	  private String getGlue() {
		return glue;
	  }
	
	}


Related Attacks


Related Vulnerabilities


Related Controls


Related Technical Impacts


References

TBD