...
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| CodeSonar |
| ALLOC.SIZE.ADDOFLOW ALLOC.SIZE.IOFLOW ALLOC.SIZE.MULOFLOW ALLOC.SIZE.SUBUFLOW ALLOC.SIZE.TRUNC IO.TAINT.SIZE MISC.MEM.SIZE.BAD | Addition Overflow of Allocation Size Addition Overflow of Allocation Size Multiplication Overflow of Allocation Size Subtraction Underflow of Allocation Size Truncation of Allocation Size Tainted Allocation Size Unreasonable Size Argument | ||||||
|
| could check violations of this rule by examining the size expression to
| |||||||
| BAD_ALLOC_STRLEN
| Can find instances where string length is miscalculated (length calculated may be one less than intended) for memory allocation purposes. Coverity Prevent cannot discover all violations of this rule, so further verification is necessary Finds memory allocations that are assigned to a pointer that reference objects larger than the allocated block | |||||||
5.0 |
| Can detect violations of this rule with CERT C Rule Pack, except those involving the | |||||||
| 9.1 | INCORRECT.ALLOC_SIZE | ||||||||
| 487 S | Fully implemented | |||||||
| 3.1.1 | |||||||||
| PRQA QA-C |
| 696 |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...
| 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 |
| CERT C++ Secure 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 |
...