Fix overflow in fgets

This commit is contained in:
flyingscorpio@arch-desktop 2021-11-14 23:32:27 +01:00
parent a1c01f71ac
commit 2bb6b24251

View file

@ -41,7 +41,7 @@ int main() {
void creer_mot_de_passe(char *mot_de_passe) {
int i = 0;
fgets(mot_de_passe, 101, stdin);
fgets(mot_de_passe, 100, stdin);
while (mot_de_passe[i] != '\n') i++;
mot_de_passe[i] = '\0';
}