Versions Compared

Key

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

...

Visual Studio 2012 and earlier versions do not support the standard  j length modifier or have a non-standard nonstandard analogue.   Consequently, you 'll need to must hard code the knowledge that intmax_t is int64_t and uintmax_t is uint64_t for Microsoft Visual Studio versions.

...

Visual Studio 2012 and earlier versions do not support the standard  standard j length modifier or have a non-standard nonstandard analogue.   Consequently, you 'll need to must hard code the knowledge that intmax_t is int64_t and uintmax_t is uint64_t for Microsoft Visual Studio versions.

...

439 S
440 S
586 S

Tool

Version

Checker

Description

LDRA tool suite

Include Page
LDRA_VLDRA_V

Partially implemented.

Compass/ROSE

 

 

Can catch violations of this rule by scanning the printf() and scanf() family of functions. For each such function, any variable that corresponds to a %d qualifier (or any qualifier besides %j) and that is not one of the built-in types (char, short, int, long, long long) indicates a violation of this rule. To catch violations, ROSE would also have to recognize derived types in expressions, such as size_t.

LDRA tool suite

Include Page
LDRA_V
LDRA_V

439 S
440 S
586 S

Partially implemented.

Related Vulnerabilities

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

Related Guidelines

...

ISO/IEC 9899:2011 Section 7.20.1.5, "Greatest-width integer types," and Section 7.21.6, "Formatted input/output functions"

...

...

Incorrect conversion between numeric types

...

...