aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
committermarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
commita0b4a1330be6a36ad095222d2ea83927cd33514d (patch)
tree616920ca608751e843c92c9815069f43789e3097 /xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
parent45710577f374972946a8eb37833a9c94e5a299bf (diff)
downloadvcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.gz
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.bz2
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.zip
mesa xserver pixman git update 25 nov 2011
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/bsd/bsd_init.c')
-rw-r--r--xorg-server/hw/xfree86/os-support/bsd/bsd_init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
index b58d6a790..7079d62b4 100644
--- a/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_init.c
@@ -446,7 +446,7 @@ xf86OpenSyscons()
}
close(fd);
- sprintf(vtname, "/dev/ttyv%01x", xf86Info.vtno - 1);
+ snprintf(vtname, sizeof(vtname), "/dev/ttyv%01x", xf86Info.vtno - 1);
if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0)
{
FatalError("xf86OpenSyscons: Cannot open %s (%s)",
@@ -550,13 +550,13 @@ xf86OpenPcvt()
}
close(fd);
- sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
+ snprintf(vtname, sizeof(vtname), "%s%01x", vtprefix, xf86Info.vtno - 1);
if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0)
{
ErrorF("xf86OpenPcvt: Cannot open %s (%s)",
vtname, strerror(errno));
xf86Info.vtno = initialVT;
- sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
+ snprintf(vtname, sizeof(vtname), "%s%01x", vtprefix, xf86Info.vtno - 1);
if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0) {
FatalError("xf86OpenPcvt: Cannot open %s (%s)",
vtname, strerror(errno));
@@ -602,9 +602,9 @@ xf86OpenWScons()
/* XXX Is this ok? */
for (i = 0; i < 8; i++) {
#if defined(__NetBSD__)
- sprintf(ttyname, "/dev/ttyE%d", i);
+ snprintf(ttyname, sizeof(ttyname), "/dev/ttyE%d", i);
#elif defined(__OpenBSD__)
- sprintf(ttyname, "/dev/ttyC%x", i);
+ snprintf(ttyname, sizeof(ttyname), "/dev/ttyC%x", i);
#endif
if ((fd = open(ttyname, 2)) != -1)
break;