diff options
author | ru <ru@FreeBSD.org> | 2000-10-03 17:05:02 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2000-10-03 17:05:02 +0000 |
commit | 6faaeadacf6a45269047225685e738d3a2526c08 (patch) | |
tree | 37b87b5e876d107d089d8f22c324643d77728050 /usr.bin | |
parent | 0dbd384823814d358b5c7d9ce9590feebd5ece26 (diff) | |
download | FreeBSD-src-6faaeadacf6a45269047225685e738d3a2526c08.zip FreeBSD-src-6faaeadacf6a45269047225685e738d3a2526c08.tar.gz |
Replaced unsafe use of sprintf() with snprintf().
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/from/from.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c index ff3581d..a8dffbb 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; } |