Skip to content

Instantly share code, notes, and snippets.

@kalloc
Created January 2, 2015 08:37
Show Gist options
  • Save kalloc/912131421bf7129b8ea2 to your computer and use it in GitHub Desktop.
Save kalloc/912131421bf7129b8ea2 to your computer and use it in GitHub Desktop.
#include <stdio.h>
void func() {
printf(", World!\n");
}
int main() {
int x[64];
printf("Hello");
*((void**)x + sizeof(x) / sizeof(void*) + 1) = (void*)func;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment