hardened_malloc/test/write_zero_size.c

13 lines
161 B
C
Raw Normal View History

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