...
Code Block | ||
---|---|---|
| ||
#include ""stdio.h"" /* confusing, distinct from <stdio.h><stdio.h> */ /* ... */ |
Compliant Solution
...
Code Block | ||
---|---|---|
| ||
/* Using a local version of stdio.h */ #include ""mystdio.h"" /* ... */ |
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, ""Standard Headers"" |
...
PRE03-C. Prefer typedefs to defines for encoding types 01. Preprocessor (PRE)