Versions Compared

Key

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

...

Both the noncompliant code example and the compliant solution are taken from INT06ERR34-C. Use strtol() or a related function to convert a string token to an integerDetect errors when converting a string to a number.

Noncompliant Code Example (rewind())

...

Tool

Version

Checker

Description

Parasoft C/C++test9.5MISRA2012-RULE-21_87Partially implemented, detects ato* functionsUse of getenv(), abort(), exit() and system()

Related Vulnerabilities

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

...