From patchwork Sat Sep 19 10:29:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 33941 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 69D92B7B6D for ; Sat, 19 Sep 2009 20:31:51 +1000 (EST) Received: from localhost ([127.0.0.1]:59242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoxEK-0008HB-Mm for incoming@patchwork.ozlabs.org; Sat, 19 Sep 2009 06:31:48 -0400 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 Received: from flocke.weilnetz.de (p54ADEC1D.dip.t-dialin.net [84.173.236.29]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0MKt72-1MoxCa2xvQ-000gC4; Sat, 19 Sep 2009 12:30:01 +0200 Received: from stefan by flocke.weilnetz.de with local (Exim 4.69) (envelope-from ) id 1MoxCZ-0002Yt-Pa; Sat, 19 Sep 2009 12:29:59 +0200 From: Stefan Weil To: QEMU Developers Date: Sat, 19 Sep 2009 12:29:59 +0200 Message-Id: <1253356199-9826-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.5.6.5 X-Provags-ID: V01U2FsdGVkX19MrNssoKjutkNEPhETGvNSuTN7/hwbbJ0z7P6 6m0hMLvL1JD+SUdJQjTRpRq5IF4NgRqGoT1kLAkQMTHU8unO08 X6g7GRoUxY8nepTZs39Rh7RPNi5yXFUYW4FrOds2PYMv3CLR45 m6A== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] eepro100: Replace sprintf by snprintf X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; }