summaryrefslogtreecommitdiffstats
path: root/usr.bin/ftp/ruserpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ftp/ruserpass.c')
-rw-r--r--usr.bin/ftp/ruserpass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/ftp/ruserpass.c b/usr.bin/ftp/ruserpass.c
index 07bb1f4..d5d69fb 100644
--- a/usr.bin/ftp/ruserpass.c
+++ b/usr.bin/ftp/ruserpass.c
@@ -144,7 +144,7 @@ next:
}
break;
case PASSWD:
- if (strcmp(*aname, "anonymous") &&
+ if ((*aname == NULL || strcmp(*aname, "anonymous")) &&
fstat(fileno(cfile), &stb) >= 0 &&
(stb.st_mode & 077) != 0) {
warnx("Error: .netrc file is readable by others.");
OpenPOWER on IntegriCloud