...
Code Block |
---|
size_t size = 16; size_t alignment = 2<<29; float *ptr,; float *ptr1; ptr = aligned_alloc(align , size); ptr1 = realloc(ptr, size); |
...
Code Block |
---|
size_t size = 16; size_t alignment = 2<<29; float *ptr, ; float *ptr1; ptr = aligned_alloc(align , size); if(align < MAX_ALIGN_T) { ptr1 = realloc(ptr, size); } |
Risk Assessment
Improper alignment could lead to accessing arbitrary memory locations and write into it.
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
MEMXX-C | low medium | probable | medium | P4 P8 | L3 |
...
L2 |
References
Wiki Markup |
---|
\[WG14 N1401\|http://www.open-std.org/Jtc1/sc22/wg14/www/docs/n1401.pdf\] |