blob: 6aa2cb7eff23fb5a0e6deaa2b9745bb47b66eead [file] [log] [blame]
/* calloc() an array and access it after it is freed. */
#include <stdlib.h>
#include <stdint.h>
union _test {
int32_t amt;
int64_t amt2;
};
int main()
{
union _test *ptrs;
ptrs = calloc(10, sizeof(union _test));
free(ptrs);
ptrs[0].amt = 99;
return 0;
}