From ae97a89e1a1a9833080dccc81f6cd26784e1b964 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 11 Jan 2001 11:42:17 +0000 Subject: A large update from Manuel Novoa III . --- libc/unistd/getpass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/unistd/getpass.c') diff --git a/libc/unistd/getpass.c b/libc/unistd/getpass.c index 4fcc489c8..92d3565c8 100644 --- a/libc/unistd/getpass.c +++ b/libc/unistd/getpass.c @@ -17,6 +17,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include #include #include @@ -72,9 +73,9 @@ getpass (prompt) /* Read the password. */ fgets (buf, PWD_BUFFER_SIZE-1, in); - nread = strlen(buf); if (buf != NULL) { + nread = strlen(buf); if (nread < 0) buf[0] = '\0'; else if (buf[nread - 1] == '\n') -- cgit v1.2.3