mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-07-24 20:21:55 +00:00
![jvoisin](/assets/img/avatar_default.png)
This pattern, used by https://github.com/kaist-hacking/HardsHeap, uncovered bugs in other memory allocators.
10 lines
146 B
C
10 lines
146 B
C
#include <malloc.h>
|
|
#include <stddef.h>
|
|
|
|
#include "../test_util.h"
|
|
|
|
OPTNONE int main(void) {
|
|
char *p = malloc(-8);
|
|
return !(p == NULL);
|
|
}
|