Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/news68k/stand/boot Use snprintf instead of sprintf
details: https://anonhg.NetBSD.org/src/rev/52463ec49aa5
branches: trunk
changeset: 328155:52463ec49aa5
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Fri Mar 28 11:49:40 2014 +0000
description:
Use snprintf instead of sprintf
diffstat:
sys/arch/news68k/stand/boot/boot.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r d0a2b8d610f1 -r 52463ec49aa5 sys/arch/news68k/stand/boot/boot.c
--- a/sys/arch/news68k/stand/boot/boot.c Fri Mar 28 10:16:28 2014 +0000
+++ b/sys/arch/news68k/stand/boot/boot.c Fri Mar 28 11:49:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.18 2010/08/25 16:35:02 christos Exp $ */
+/* $NetBSD: boot.c,v 1.19 2014/03/28 11:49:40 ozaki-r Exp $ */
/*-
* Copyright (c) 1999 Izumi Tsutsui. All rights reserved.
@@ -114,7 +114,7 @@
return;
}
- sprintf(devname, "%s(%d,%d,%d)", devs[type], ctlr, unit, part);
+ snprintf(devname, sizeof(devname), "%s(%d,%d,%d)", devs[type], ctlr, unit, part);
printf("Booting %s%s\n", devname, netbsd);
/* use user specified kernel name if exists */
@@ -128,7 +128,7 @@
loadflag &= ~LOAD_BACKWARDS;
for (i = 0; kernels[i]; i++) {
- sprintf(file, "%s%s", devname, kernels[i]);
+ snprintf(file, sizeof(file), "%s%s", devname, kernels[i]);
DPRINTF("trying %s...\n", file);
fd = loadfile(file, marks, loadflag);
if (fd != -1)
Home |
Main Index |
Thread Index |
Old Index