Skip to content

Instantly share code, notes, and snippets.

@Karasiq
Created October 27, 2014 00:32
Show Gist options
  • Save Karasiq/4143d1968a71b2965005 to your computer and use it in GitHub Desktop.
Save Karasiq/4143d1968a71b2965005 to your computer and use it in GitHub Desktop.
#include <stdio.h>
void a0() {
puts("Hui sasi");
}
void __attribute__ ((noinline)) r(void ***a) {
a[2] = *(a[1] = (a[0] = &a) - 1);
*a[1] = a0; *a[0] = a[2];
}
int main() {
void *a[3] = { 0xffff, 0x8048340 };
r((void***)a);
puts("Guboi trisi");
return ((int)a[0] + (int)a[1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment