qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] eepro100: Replace sprintf by snprintf
@ 2009-09-19 10:29 Stefan Weil
  0 siblings, 0 replies; only message in thread
From: Stefan Weil @ 2009-09-19 10:29 UTC (permalink / raw)
  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 <weil@mail.berlios.de>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-19 10:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-19 10:29 [Qemu-devel] [PATCH] eepro100: Replace sprintf by snprintf Stefan Weil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).