diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-01-11 11:42:17 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-01-11 11:42:17 +0000 |
commit | ae97a89e1a1a9833080dccc81f6cd26784e1b964 (patch) | |
tree | 6ff1ddc7e3980591c7fd0bbd5d9b8ac82da12886 /libc/unistd/getpass.c | |
parent | abdc3e4d06db2b9d93c509774fc7c4fde918ec8e (diff) |
A large update from Manuel Novoa III <mnovoa3@bellsouth.net>.
Diffstat (limited to 'libc/unistd/getpass.c')
-rw-r--r-- | libc/unistd/getpass.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <stdio.h> +#include <string.h> #include <termios.h> #include <unistd.h> #include <string.h> @@ -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') |