Skip to content

Commit

Permalink
Merge pull request #191 from mgiacomoli/ask-fingerprint-flush-stdin
Browse files Browse the repository at this point in the history
Dbclient: Flush stdin after fingerprint confirmation
  • Loading branch information
mkj authored Oct 25, 2022
2 parents 5284a3d + b36707b commit d1fed8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli-kex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit d1fed8b

Please sign in to comment.