mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-09-07 01:52:32 +00:00
13 lines
189 B
C
13 lines
189 B
C
|
#include <stdlib.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
__attribute__((optimize(0)))
|
||
|
int main(void) {
|
||
|
char *p = malloc(0);
|
||
|
if (!p) {
|
||
|
return 1;
|
||
|
}
|
||
|
printf("%c\n", *p);
|
||
|
return 0;
|
||
|
}
|