mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-19 16:23:29 +00:00
newfs_msdos: prefer snprintf to sprintf
Obtained from: NetBSD Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
d8f3dc7871
commit
59faa1e9fb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=289424
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue