summaryrefslogtreecommitdiffstats
path: root/usr.bin/ftp/ruserpass.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1997-03-24 05:51:59 +0000
committerimp <imp@FreeBSD.org>1997-03-24 05:51:59 +0000
commite5d10bdc2e49726df5f9f4de7b68c37c1235a234 (patch)
treeb694debe9989e5c4399144cbfab06ee793988333 /usr.bin/ftp/ruserpass.c
parent2a37113faaf40fd7416a8c158086a456c31b0ba2 (diff)
downloadFreeBSD-src-e5d10bdc2e49726df5f9f4de7b68c37c1235a234.zip
FreeBSD-src-e5d10bdc2e49726df5f9f4de7b68c37c1235a234.tar.gz
Buffer overflow from Keith Bostic.
Obtained from: BSDi by way of Keith Bostic
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 026773c..85a190e 100644
--- a/usr.bin/ftp/ruserpass.c
+++ b/usr.bin/ftp/ruserpass.c
@@ -87,7 +87,7 @@ ruserpass(host, aname, apass, aacct)
hdir = getenv("HOME");
if (hdir == NULL)
hdir = ".";
- (void) sprintf(buf, "%s/.netrc", hdir);
+ (void) snprintf(buf, sizeof(buf), "%s/.netrc", hdir);
cfile = fopen(buf, "r");
if (cfile == NULL) {
if (errno != ENOENT)
OpenPOWER on IntegriCloud