Versions Compared

Key

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

...

Code Block
bgColor#FFcccc
langc

enum { IN_STR_LEN=18, OUT_STR_LEN=20 };

...

Code Block
bgColor#ccccff
langc

enum { IN_STR_LEN=18, OUT_STR_LEN=IN_STR_LEN+2 };

...

Code Block
bgColor#FFcccc
langc

enum { ADULT_AGE=18 };

/* misleading, relationship established when none exists */
enum { ALCOHOL_AGE=ADULT_AGE+3 };

...

Code Block
bgColor#ccccff
langc

enum { ADULT_AGE=18 };
enum { ALCOHOL_AGE=21 };

...

LDRA tool suite

Tool

Version

Checker

Description

Section
Include Page
LDRA_V
LDRA_V
section

387 S

section

Partially

Implemented

implemented

Related Vulnerabilities

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

...

CERT C++ Secure Coding Standard: DCL08-CPP. Properly encode relationships in constant definitions

ISO/IEC 9899:19992011 Section 6.10, "Preprocessing directives," and Section 5.1.1, "Translation environment"

...