Flush input when prompting for a password (bug 373).

1_1_stable
Rob Landley 2005-12-12 07:02:15 +00:00
parent a75c180e53
commit e422af6bcb
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ char *bb_askpass(int timeout, const char * prompt)
static char passwd[PWD_BUFFER_SIZE];
tcgetattr(STDIN_FILENO, &old);
tcflush(STDIN_FILENO, TCIFLUSH);
size = sizeof(passwd);
ret = passwd;