aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/newfs_msdos
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-10-16 15:19:36 +0000
committerEd Maste <emaste@FreeBSD.org>2015-10-16 15:19:36 +0000
commit59faa1e9fb8e18abf699a3f4df99fd2ce1a4d42e (patch)
tree47c3d8ebf2a63845ec4870fe5e0f09ba1b266c12 /sbin/newfs_msdos
parentd8f3dc78717ce8610f8c9c652392d07a911cf50c (diff)
downloadsrc-59faa1e9fb8e18abf699a3f4df99fd2ce1a4d42e.tar.gz
src-59faa1e9fb8e18abf699a3f4df99fd2ce1a4d42e.zip
newfs_msdos: prefer snprintf to sprintf
Obtained from: NetBSD Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=289424
Diffstat (limited to 'sbin/newfs_msdos')
-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 f4222700365b..282803599742 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);