From 3af1b4012d931e6108e1f975c5e9c4700d20774c Mon Sep 17 00:00:00 2001 From: landley Date: Mon, 12 Dec 2005 07:02:15 +0000 Subject: Flush input when prompting for a password (bug 373). git-svn-id: svn://busybox.net/trunk/busybox@12844 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- 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; -- cgit v1.2.3-55-g6feb