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="e6f973b351fe320a-b4d3e9e5-4a6145cf-8263bfc8-debf4805bc14dbf4c5446e64"><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>

...