Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoxDS-0008Gw-NB for qemu-devel@nongnu.org; Sat, 19 Sep 2009 06:30:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoxDN-0008GR-IN for qemu-devel@nongnu.org; Sat, 19 Sep 2009 06:30:53 -0400 Received: from [199.232.76.173] (port=53639 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoxDN-0008GO-5n for qemu-devel@nongnu.org; Sat, 19 Sep 2009 06:30:49 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:51554) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MoxDL-00033Y-HI for qemu-devel@nongnu.org; Sat, 19 Sep 2009 06:30:47 -0400 From: Stefan Weil Date: Sat, 19 Sep 2009 12:29:59 +0200 Message-Id: <1253356199-9826-1-git-send-email-weil@mail.berlios.de> Subject: [Qemu-devel] [PATCH] eepro100: Replace sprintf by snprintf List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers This patch is a step to synchronize my maintainer version of eepro100.c (git://repo.or.cz/qemu/ar7.git) with the version integrated in QEMU. Signed-off-by: Stefan Weil --- hw/eepro100.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/eepro100.c b/hw/eepro100.c index 89987d7..f1a9310 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -537,12 +537,12 @@ static char *regname(uint32_t addr) if (addr < PCI_IO_SIZE) { const char *r = reg[addr / 4]; if (r != 0) { - sprintf(buf, "%s+%u", r, addr % 4); + snprintf(buf, sizeof(buf), "%s+%u", r, addr % 4); } else { - sprintf(buf, "0x%02x", addr); + snprintf(buf, sizeof(buf), "0x%02x", addr); } } else { - sprintf(buf, "??? 0x%08x", addr); + snprintf(buf, sizeof(buf), "??? 0x%08x", addr); } return buf; } -- 1.5.6.5