Versions Compared

Key

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

...

This noncompliant code example assumes that the size of struct buffer is equal to the sum of the size of its individual components, which may not be the case [Dowd 2006]. The size of struct buffer may actually be larger due to structure padding.

...

Tool

Version

Checker

Description

LDRA tool suite

Include Page
LDRA_V
LDRA_V

400 S
578 S

Fully implemented

PRQA QA-C
Include Page
PRQA_V
PRQA_V
 0697Partially implemented

Related Vulnerabilities

...

ISO/IEC 9899:2011 Section 6.7.2.1, "Structure and union specifiers"

Bibliography

[Dowd 2006] Chapter 6, "C Language Issues" ("Structure padding," pp. 284–287)
[Sloss 2004] Section 5.7, "Structure arrangement"

...