qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 41cbc23] eepro100: Replace sprintf by snprintf


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 41cbc23] eepro100: Replace sprintf by snprintf
Date: Sat, 26 Sep 2009 21:57:13 -0000

From: Stefan Weil <address@hidden>

Signed-off-by: Stefan Weil <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>

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;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]