...
Exceptions
EXP09-EX1: The C standard explicitly Standard explicitly declares sizeof(char) == 1, so any sizes based on characters or character arrays may be evaluated without using sizeof. This does not apply to char* or any other data types.
...
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
...
| EXP09-CPP. Use sizeof to determine the size of a type or variable | |
|---|---|
| MITRE CWE | Buffer access with incorrect length value |
Bibliography
...
| ] | Section 6.2.6, "Representations of |
|---|
...
Types," and Section 6.5.3.4, "The sizeof and _Alignof |
|---|
...
MITRE CWE: CWE-805, "Buffer access with incorrect length value"
...
| Operators" |
|---|
...