hardened_malloc/test/write_zero_size.c

14 lines
180 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;
}