An object of type void *
is a generic data pointer. It can point to any data object. For any incomplete or object type T
, C permits implicit conversion from T *
to void *
or from void *
to T *
. The Standard standard C Library library uses void *
to declare parameters and return types of functions designed to work for objects of different types. Such is the case with the standard memory allocation functions aligned_alloc()
, malloc()
, calloc()
, and realloc()
.
...
Tool | Version | Checker | Description | LDRA tool suite||||||
---|---|---|---|---|---|---|---|---|---|
Include Page | LDRA_V | LDRA_V |
|
| |||||
Fortify SCA | V. 5.0 |
| Can detect violations of this rule with CERT C Rule Pack. | ||||||
Compass/ROSE |
|
| Can detect some violations of this recommendation when checking EXP36-C. Do not convert pointers into more strictly aligned pointer types. | ||||||
ECLAIR |
| funcalls | Fully implemented. | ||||||
Fortify SCA | 5.0 |
| Can detect violations of this rule with CERT C Rule Pack. | ||||||
|
|
| |||||||
PRQA QA-C |
| 0695 | Fully implemented. |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
...
...
Bibliography
...
...