Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thesp0nge/5f90301a8fdf84795aa116676d1c6ab7 to your computer and use it in GitHub Desktop.
Save thesp0nge/5f90301a8fdf84795aa116676d1c6ab7 to your computer and use it in GitHub Desktop.
spot_the_vuln_1
#include <stdio.h>
#include <string.h>
void copyString(char* input) {
char buffer[10];
strcpy(buffer, input);
printf("Copia effettuata: %s\n", buffer);
}
int main() {
char userInput[50];
printf("Inserisci una stringa: ");
fgets(userInput, 50, stdin);
copyString(userInput);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment