Merge pull request #191 from mgiacomoli/ask-fingerprint-flush-stdin

Dbclient: Flush stdin after fingerprint confirmation
This commit is contained in:
Matt Johnston 2022-10-25 23:47:45 +08:00 committed by GitHub
commit d1fed8b451
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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