Versions Compared

Key

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

...

Code Block
bgColor#FFcccc
langc
void f() {
  char path[PATH_MAX]; /* requiresRequires PATH_MAX to be defined */
  strcpy(path, getenv("PATH"));
  /* Use path */
}

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

ENV01-C

highHigh

likelyLikely

mediumMedium

P18

L1

Automated Detection

Tool

Version

Checker

Description

Compass/ROSE

 

 

Can detect violations of the rule by using the same method as STR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator

Related Vulnerabilities

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

Related Guidelines

...