Module Name: src Committed By: ozaki-r Date: Sat Mar 29 05:07:25 UTC 2014
Modified Files: src/sys/arch/news68k/stand/bootxx: bootxx.c Log Message: Replace sprintf with snprintf To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/news68k/stand/bootxx/bootxx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/news68k/stand/bootxx/bootxx.c diff -u src/sys/arch/news68k/stand/bootxx/bootxx.c:1.10 src/sys/arch/news68k/stand/bootxx/bootxx.c:1.11 --- src/sys/arch/news68k/stand/bootxx/bootxx.c:1.10 Wed May 14 13:29:28 2008 +++ src/sys/arch/news68k/stand/bootxx/bootxx.c Sat Mar 29 05:07:25 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.10 2008/05/14 13:29:28 tsutsui Exp $ */ +/* $NetBSD: bootxx.c,v 1.11 2014/03/29 05:07:25 ozaki-r Exp $ */ /*- * Copyright (c) 1999 Izumi Tsutsui. All rights reserved. @@ -113,7 +113,8 @@ bootxx(uint32_t d4, uint32_t d5, uint32_ 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); fd = rom_open(devname, 0); if (fd == -1) {