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

14 lines
183 B
C

#include <stdlib.h>
#include <stdio.h>
#include "../test_util.h"
OPTNONE int main(void) {
char *p = malloc(0);
if (!p) {
return 1;
}
*p = 5;
return 0;
}