Versions Compared

Key

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

...

Code Block
bgColor#ffcccc
#include "&quot;stdio.h"&quot;  /* confusing, distinct from <stdio.h>&lt;stdio.h&gt; */

/* ... */

Compliant Solution

...

Code Block
bgColor#ccccff
/* Using a local version of stdio.h */ 
#include "&quot;mystdio.h"&quot;

/* ... */

Risk Assessment

Using header file names that conflict with other header file names can result in an incorrect file being included.

...

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

Other Languages

This rule appears in the C++ Secure Coding Standard as PRE04-CPP. Do not reuse a standard header file name.

References

Wiki Markup
\[[ISO/IEC 9899:1999|AA. C References#ISO/IEC 9899-1999]\] Section 7.1.2, "&quot;Standard Headers"&quot;

...

PRE03-C. Prefer typedefs to defines for encoding types      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;01. Preprocessor (PRE)       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;