Skip to content

Instantly share code, notes, and snippets.

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