mirror of
https://github.com/nganhkhoa/CTF-All-In-One.git
synced 2025-06-28 22:05:02 +07:00
fix
This commit is contained in:
11
src/others/4.14_glibc_tcache/cve201717426.c
Normal file
11
src/others/4.14_glibc_tcache/cve201717426.c
Normal file
@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
void *x = malloc(10);
|
||||
printf("malloc(10): %p\n", x);
|
||||
free(x);
|
||||
|
||||
void *y = malloc(((size_t)~0) - 2); // overflow allocation (size_t.max-2)
|
||||
printf("malloc(((size_t)~0) - 2): %p\n", y);
|
||||
}
|
Reference in New Issue
Block a user