aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2009-09-19 12:29:59 +0200
committerAurelien Jarno <aurelien@aurel32.net>2009-09-26 23:48:17 +0200
commit41cbc23c5ca37a8b841915d7d252a02106d58b1e (patch)
treeb8ebdbde477feeed60374b590cfe8bfa459f5752
parentfd9ae2ec06bd3d782a50d3dd48d8834a63d257b3 (diff)
eepro100: Replace sprintf by snprintf
Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r--hw/eepro100.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 89987d7fd1..f1a9310a67 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;
}