What it is
The code calls sizeof() on a pointer type, when the programmer intended to determine the size of the data that is being pointed to.
Impact on systems
| Scope | Impact |
|---|---|
| Integrity, Confidentiality | Modify Memory, Read Memory This error can often cause one to allocate a buffer that is much smaller than what is needed, leading to resultant weaknesses such as buffer overflows. |
How to prevent it
Source: MITRE CWE catalog · Official entry on the MITRE website