hardened_malloc-rs 0.1.2+12

hardened_malloc rust wrapper
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdlib.h>

#include <sys/mman.h>

#include "test_util.h"

OPTNONE int main(void) {
    free(malloc(16));
    char *p = mmap(NULL, 4096 * 16, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
    if (p == MAP_FAILED) {
        return 1;
    }
    free(p + 4096 * 8);
    return 0;
}