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

14 lines
195 B
C

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