Skip to content

Instantly share code, notes, and snippets.

@st424204
Created December 4, 2020 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save st424204/8d8ab0472f6d911ea7daf64f88802c12 to your computer and use it in GitHub Desktop.
Save st424204/8d8ab0472f6d911ea7daf64f88802c12 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main(){
size_t *x = malloc(0x10);
size_t *a = malloc(0x500);
size_t* b = malloc(0x10);
x[2] = -0x10;
x[3] = 0x510;
a[1] = -0x10;
x[0] = &a[0];
a[2] = &x[-3];
a[3] = &x[-2];
free(a);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment