Created
July 7, 2023 10:13
-
-
Save thesp0nge/5f90301a8fdf84795aa116676d1c6ab7 to your computer and use it in GitHub Desktop.
spot_the_vuln_1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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