Versions Compared

Key

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

...

This rule appears in the C++ Secure Coding Standard as rule MSC21-CPP. Use inequality to terminate a loop whose counter changes by more than one.

Related Guidelines

MITRE CWE

CWE-835 "Loop with Unreachable Exit Condition ('Infinite Loop')"

 

CWE-834 "Excessive Iteration"

Bibliography

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="464da7473770321f-e8d046fc-4ed04928-945ba196-bee31a2dcbd68fc2701b5da6"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

15.20.1 Numerical Comparison Operators <, <=, >, and >=

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

...