Skip to content

Instantly share code, notes, and snippets.

@wengxt
Created November 10, 2015 00:27
Show Gist options
  • Save wengxt/c0171c9a0dfbdfe9a55c to your computer and use it in GitHub Desktop.
Save wengxt/c0171c9a0dfbdfe9a55c to your computer and use it in GitHub Desktop.
#include <sys/signal.h>
#include <unistd.h>
void handler()
{
write(2, "a\n", 2);
}
int main(void) {
signal(SIGSEGV, handler);
char *info1 = (char*) 0x1;
*info1 = 1;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment