aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/from
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2000-10-03 17:05:02 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2000-10-03 17:05:02 +0000
commitd2ba10a92f0b4a9114ed14cb03d9d11709128384 (patch)
treed14c571cb4146aa449e64b8003017cfb2d67ae8a /usr.bin/from
parente1c3363398f85ed6111bea3ec4b030bf5ad3306d (diff)
downloadsrc-d2ba10a92f0b4a9114ed14cb03d9d11709128384.tar.gz
src-d2ba10a92f0b4a9114ed14cb03d9d11709128384.zip
Notes
Diffstat (limited to 'usr.bin/from')
-rw-r--r--usr.bin/from/from.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c
index ff3581d25e8d..a8dffbb9ba93 100644
--- a/usr.bin/from/from.c
+++ b/usr.bin/from/from.c
@@ -96,14 +96,14 @@ main(argc, argv)
if (!file) {
if (*argv) {
- (void)sprintf(buf, "%s/%s", _PATH_MAILDIR, *argv);
+ (void)snprintf(buf, sizeof(buf), "%s/%s", _PATH_MAILDIR, *argv);
file = buf;
} else {
if (!(file = getenv("MAIL"))) {
if (!(pwd = getpwuid(getuid())))
errx(1, "no password file entry for you");
file = pwd->pw_name;
- (void)sprintf(buf,
+ (void)snprintf(buf, sizeof(buf),
"%s/%s", _PATH_MAILDIR, file);
file = buf;
}