Skip to content

Instantly share code, notes, and snippets.

@shantoroy
Created April 1, 2020 15:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void IShouldNeverBeCalled() {
puts("I should never be called");
exit(0);
}
void vulnerable(char *arg) {
char buff[100];
printf("%p\n",&buff[0]);
strcpy(buff, arg);
}
int main(int argc, char *argv[]) {
vulnerable(argv[1]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment