summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-10-16 15:19:36 +0000
committeremaste <emaste@FreeBSD.org>2015-10-16 15:19:36 +0000
commit8dec90b4ee4b279723902115d3f897aa0b51f4f1 (patch)
tree47c3d8ebf2a63845ec4870fe5e0f09ba1b266c12 /sbin
parent0fdc52ff38d78fb152119b65b7b28259562e8a74 (diff)
downloadFreeBSD-src-8dec90b4ee4b279723902115d3f897aa0b51f4f1.zip
FreeBSD-src-8dec90b4ee4b279723902115d3f897aa0b51f4f1.tar.gz
newfs_msdos: prefer snprintf to sprintf
Obtained from: NetBSD Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sbin')
-rw-r--r--sbin/newfs_msdos/mkfs_msdos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/newfs_msdos/mkfs_msdos.c b/sbin/newfs_msdos/mkfs_msdos.c
index f422270..2828035 100644
--- a/sbin/newfs_msdos/mkfs_msdos.c
+++ b/sbin/newfs_msdos/mkfs_msdos.c
@@ -585,7 +585,7 @@ int mkfs_msdos(const char *fname, const char *dtype,
(u_int)tm->tm_min));
mk4(bsx->exVolumeID, x);
mklabel(bsx->exVolumeLabel, o.volume_label ? o.volume_label : "NO NAME");
- sprintf(buf, "FAT%u", fat);
+ snprintf(buf, sizeof(buf), "FAT%u", fat);
setstr(bsx->exFileSysType, buf, sizeof(bsx->exFileSysType));
if (!o.bootstrap) {
x1 += sizeof(struct bsx);
OpenPOWER on IntegriCloud