Versions Compared

Key

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

...

The Coverity Prevent Version 5.0 MUTABLE_COMPARISON checker can detect the instances where compareTo method is reading from a non-constant field. If the non-constant field is modified, the value of compareTo might change, which may break program invariants.

Related Vulnerabilities

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="4e2b5266-f4de-4ef6-b29b-09d35d5646df"><ac:plain-text-body><![CDATA[

[[MITRE 2009

AA. Bibliography#MITRE 09]]

[CWE-573

http://cwe.mitre.org/data/definitions/573.html] "Improper Following of Specification by Caller"

]]></ac:plain-text-body></ac:structured-macro>

Other Languages

This rule appears in the C++ Secure Coding Standard as ARR40-CPP. Use a valid ordering rule.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0f5b932e26679c2f-7c5ae5d8-4f5846f4-8f1791e4-27eaa34b4cb1bbd1c3a52874"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

method [compareTo()

http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html#compareTo(java.lang.Object)]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3619e0e390d27b8c-97619390-404d43b8-be4a93a2-b0a8c9e8ea04261d072425c4"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

 

]]></ac:plain-text-body></ac:structured-macro>

...