Versions Compared

Key

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

...

Do not modify the value returned by the getenv() function. Create a copy and make your changes locally, using setenv() to update environ the environment when necessary. This allows the implementation to properly allocate and manage memory.

...

L

Rule

Severity 

Likelihood 

Remediation Cost

Priority

Level

ENV30-C

2 (Medium)

3 (probable)   

2 (Medium)

P


P8

L2

References

Wiki Markup
\[[ISO/IEC 9899-1999|AA. C References#ISO/IEC 9899-1999]\] Section 7.20.4, "Communication with the environment"
\[[Open Group 04|AA. C References#Open Group 04]\] Chapter 8, "Environment Variables", [strdup|http://www.opengroup.org/onlinepubs/009695399/functions/strdup.html]
\[[Viega 03|AA. C References#Viega 03]\] Section 3.6, "Using Environment Variables Securely"