From ff42d86e8b12ba5c2934b5e360d2cfe2bf84a2d3 Mon Sep 17 00:00:00 2001 From: Yoshihiro Takahashi Date: Mon, 14 Oct 2002 13:04:21 +0000 Subject: [PATCH] Use snprintf() instead of sprintf(). --- usr.sbin/sysinstall/floppy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/sysinstall/floppy.c b/usr.sbin/sysinstall/floppy.c index d91813f01873..fc17459e2db9 100644 --- a/usr.sbin/sysinstall/floppy.c +++ b/usr.sbin/sysinstall/floppy.c @@ -104,19 +104,19 @@ mediaInitFloppy(Device *dev) #endif #ifdef PC98 - sprintf(fddev, "%s.1200", dev->devname); + snprintf(fddev, sizeof (fddev), "%s.1200", dev->devname); if (mount("msdosfs", mp, MNT_RDONLY, (caddr_t)&dosargs) != -1) goto success; if (mount("ufs", mp, MNT_RDONLY, (caddr_t)&u_args) != -1) goto success; - sprintf(fddev, "%s.1232", dev->devname); + snprintf(fddev, sizeof (fddev), "%s.1232", dev->devname); if (mount("msdosfs", mp, MNT_RDONLY, (caddr_t)&dosargs) != -1) goto success; if (mount("ufs", mp, MNT_RDONLY, (caddr_t)&u_args) != -1) goto success; - sprintf(fddev, "%s.1440", dev->devname); + snprintf(fddev, sizeof (fddev), "%s.1440", dev->devname); if (mount("msdosfs", mp, MNT_RDONLY, (caddr_t)&dosargs) != -1) goto success; if (mount("ufs", mp, MNT_RDONLY, (caddr_t)&u_args) != -1)