diff options
author | imp <imp@FreeBSD.org> | 1997-03-24 05:51:59 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-03-24 05:51:59 +0000 |
commit | e5d10bdc2e49726df5f9f4de7b68c37c1235a234 (patch) | |
tree | b694debe9989e5c4399144cbfab06ee793988333 /usr.bin/ftp | |
parent | 2a37113faaf40fd7416a8c158086a456c31b0ba2 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | usr.bin/ftp/ruserpass.c | 2 |
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) |