...
Any other system-allocation and system-deallocation functions are implementation-defined.
Code Block |
---|
void \*realloc (void \*ptr, size_t size); |
The function realloc is a system-allocation function and a system-deallocation function. The realloc function deallocates an old object pointed to by ptr and returns a pointer to a new object that has the specified size. The contents of the new object shall be the same as that of the old object prior to deallocation, up to the minimum of the new and old sizes and the remaining bytes have indeterminate values.
...
Code Block |
---|
size_t size = 16; size_t alignment = 2<<29; float *ptr, *ptr1; ptr = aligned_alloc(align , size); if(align < MAX_ALIGN_T) { ptr1 = realloc(ptr, size); } |
Risk Assessment
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
MEMXX-C | low | probable | medium | P4 | L3 |