Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
public class DoNotIgnore {
  public static void main(String[] args) {
    String original = "insecure";
    original = original.replace( 'i', '9' );
    System.out.println (original);
  }
}

References

Risk Assessment

Ignoring method return values may lead to erroneous computation which, in turn, may lead to security risks.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

EXP02-J

medium

probable

medium

P??

L??

Automated Detection

TODO

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

References

Wiki Markup
\[[Green 08|AA. Java References#Green 08]\] [
Canadian Mind Products Java & Internet Glossary by Roedy Green
"String.replace"|http://mindprod.com/jgloss/gotchas.html
Image Removed
API
]
\[[API 06|AA. Java References#API 06]\] [String.replace|http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html
Image Removed
]