From: Rob Landley Date: Mon, 12 Dec 2005 07:02:15 +0000 (-0000) Subject: Flush input when prompting for a password (bug 373). X-Git-Tag: 1_1_0~430 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e422af6bcb15a92b7eba3da5b5cf1bcc8c0b5f5c;p=oweals%2Fbusybox.git Flush input when prompting for a password (bug 373). --- 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;