Fix overflow in fgets
This commit is contained in:
parent
a1c01f71ac
commit
2bb6b24251
1 changed files with 1 additions and 1 deletions
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue