Flush stdin after fingerprint confirmation

This commit is contained in:
Michele Giacomoli 2022-09-19 18:09:38 +02:00
parent 17e02fe614
commit acf50a4f98

View File

@ -229,6 +229,8 @@ static void ask_to_confirm(const unsigned char* keyblob, unsigned int keybloblen
fclose(tty); fclose(tty);
} else { } else {
response = getc(stdin); response = getc(stdin);
// flush stdin buffer
while ((getchar()) != '\n');
} }
if (response == 'y') { if (response == 'y') {