Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ffcccc
size_t size = 16;
size_t alignment = 2<<121<<12;
float *ptr;
double *ptr1;

ptr = aligned_alloc(align , size);
ptr1 = realloc(ptr, size);

...

Code Block
bgColor#ccccff
size_t size = 16;
size_t alignment = 2 << 121<<12;
float *ptr;
double *ptr1;

ptr = aligned_alloc(align , size);

if(align == alignof(ptr1)) {
ptr1 = realloc(ptr, size);
}

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

MEMXX-C

medium

probable

medium

P8

L2

References

Wiki Markup
\[[ISO/IEC 9899:201x|http://www.open-std.org/Jtc1/sc22/wg14/www/docs/n1401.pdf]\] Section 7.21.3