From 52c00ed2041ad9d1a3dd4029e4d73577f7808844 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 19 Sep 2009 12:29:59 +0200 Subject: [PATCH] eepro100: Replace sprintf by snprintf Signed-off-by: Stefan Weil Signed-off-by: Aurelien Jarno --- hw/eepro100.c | 6 +++--- 1 file 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; } -- 2.7.4