Versions Compared

Key

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

...

This noncompliant code example may appear appears to have 5 iterations, but, in fact, the loop never terminates.

...

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

Related Guidelines

CERT C+

...

+ Secure Coding Standard: MSC21-CPP. Use inequality to terminate a loop whose counter changes by more than one

The CERT Oracle Secure Coding Standard for Java: MSC15-J. Use numerical comparison operators to terminate a loop whose counter changes by more than one

MISRA

Bibliography

...

...

      49. Miscellaneous (MSC)