From e422af6bcb15a92b7eba3da5b5cf1bcc8c0b5f5c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 12 Dec 2005 07:02:15 +0000 Subject: [PATCH] Flush input when prompting for a password (bug 373). --- libbb/bb_askpass.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c index 1ae1520d9..42ccd66d3 100644 --- a/libbb/bb_askpass.c +++ b/libbb/bb_askpass.c @@ -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; -- 2.25.1