...
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 | ||||||
---|---|---|---|---|---|---|---|---|---|
| 400 S | Fully implemented | |||||||
PRQA QA-C |
| 0697 | Partially 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"
...