You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

If a file with the same name as a standard header is placed in the search path for included source files, the behavior is undefined.

These are the standard headers:

<assert.h>

<complex.h>

<ctype.h>

<errno.h>

<fenv.h>

<float.h>

<inttypes.h>

<iso646.h>

<limits.h>

<locale.h>

<math.h>

<setjmp.h>

<signal.h>

<stdarg.h>

<stdbool.h>

<stddef.h>

<stdint.h>

<stdio.h>

<stdlib.h>

<string.h>

<tgmath.h>

<time.h>

<wchar.h>

<wctype.h>

Risk Assessment

Using header names that conflict with the C standard library functions can result in not including the intended file.

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

PRE04-A

1 (low)

1 (unlikely)

3 (low)

P3

L3

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

References

[[ISO/IEC 9899-1999]] Section 7.1.2, "Standard Headers"


PRE03-A. Prefer typedefs to defines for encoding types      01. Preprocessor (PRE)       PRE05-A. Use parentheses around any macro replacement list containing operators

  • No labels