...
| CERT C Secure Coding Standard | ARR01-C. Do not apply the sizeof operator to a pointer when taking the size of an array INT31-C. Ensure that integer conversions do not result in lost or misinterpreted data INT32-C. Ensure that operations on signed integers do not result in overflow INT18-C. Evaluate integer expressions in a larger size before comparing or assigning to that size MEM04-C. Beware of zero-length allocations VOID EXP01-C. Do not take the size of a pointer to determine the size of the pointed-to type |
| SEI CERT C++ Coding Standard | VOID MEM35-CPP. Allocate sufficient memory for an object |
| ISO/IEC TR 24772:2013 | Buffer Boundary Violation (Buffer Overflow) [HCB] |
| ISO/IEC TS 17961:2013 | Taking the size of a pointer to determine the size of the pointed-to type [sizeofptr] |
| MITRE CWE | CWE-131, Incorrect Calculation of Buffer Size CWE-190, Integer Overflow or Wraparound) CWE-467, Use of sizeof() on a Pointer Type |
...