Versions Compared

Key

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

...

Code Block
bgColor#FFcccc
langc

#include "stdio.h"  /* confusing, distinct from <stdio.h> */

/* ... */

...

The solution addresses the problem by giving the local library a unique name (per recommendation PRE08-C. Guarantee that header file names are unique), which makes it apparent that the library used is not the original.

Code Block
bgColor#ccccFF
langc

/* Using a local version of stdio.h */ 
#include "mystdio.h"

/* ... */

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

PRE04-C

low

unlikely

medium

P2

L3

Automated Detection

section

568 S

Fully Implemented

ToolVersionCheckerDescription

LDRA tool suite

Include Page
LDRA_V
LDRA_V
section

218 S


218 S
568 S

Fully implemented

Section

Related Vulnerabilities

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

...

CERT C++ Secure Coding Standard: PRE04-CPP. Do not reuse a standard header file name

ISO/IEC 9899:19992011 Section 7.1.2, "Standard Headers"

...