From ed8b32ff0e8276e978b6258aecbc7045227b2185 Mon Sep 17 00:00:00 2001 From: Stathis Kamperis Date: Mon, 6 Aug 2007 16:03:22 +0300 Subject: [PATCH] Use fgets() instead of scanf() to honour the PASSLEN constant --- termios/echo_off.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termios/echo_off.c b/termios/echo_off.c index d4953a7..5a562ea 100644 --- a/termios/echo_off.c +++ b/termios/echo_off.c @@ -38,7 +38,7 @@ int main(int argc, char *argv[]) /* prompt for password and get it*/ printf("Password: "); - scanf("%64s", password); + fgets(password, PASSLEN, stdin); /* restole old termios structure */ if (tcsetattr(fd, TCSANOW, &oldt) == -1) -- 2.11.4.GIT