Versions Compared

Key

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

...

The improper use of strtok() is likely to result in truncated data, producing unexpected results later in program execution.

Recommendation

Severity

Likelihood

Remediation Cost

Detectable

Repairable

Priority

Level

STR06-C

medium

Medium

Likely

likely

No

medium

No

P12

P6

L1

L2

Automated Detection

Tool

Version

Checker

Description

CodeSonar
Include Page
CodeSonar_V
CodeSonar_V
(customization)Users who wish to avoid using strtok() entirely can add a custom check for all uses of strtok().
Compass/ROSE
 

Fortify SCA

5.0

 

Can detect violations of this rule with CERT C Rule Pack




Helix QAC

 

 

Include Page
Helix QAC_V
Helix QAC_V

C5007
LDRA tool suite
Include Page
LDRA_V
LDRA_V

602 S

Fully implemented

Enhanced Enforcement

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C: Rec. STR06-C

Checks for string passed to strok() without copying.

Related Vulnerabilities

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

Related Guidelines

Bibliography

...


...

Image Modified Image Modified Image Modified