hardened_malloc/test/simple-memory-corruption/invalid_free_small_region.c

13 lines
188 B
C
Raw Normal View History

2018-08-24 08:45:48 +00:00
#include <stdlib.h>
__attribute__((optimize(0)))
int main(void) {
char *p = malloc(16);
if (!p) {
return 1;
}
char *q = p + 4096 * 4;
free(q);
return 0;
}