summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2014-11-06 14:03:02 +0100
committerTom Rini <trini@ti.com>2014-11-07 16:27:08 -0500
commitcc87d18a6ec74180784a6b1cdafefeacd8eb1bf2 (patch)
treeb18b650886b4a84e0d350f3127ae0b476171d2fd
parent1aaab00d8889d7a573f0f13480e274a390c26b06 (diff)
board/matrix_vision/mvblx/sys_eeprom.c: fix buffer overflow
Fix error detected by cppcheck: [board/matrix_vision/mvblx/sys_eeprom.c:353]: (error) Buffer is accessed out of bounds. Signed-off-by: Wolfgang Denk <wd@denx.de> cc: Michael Jones <michael.jones@matrix-vision.de> Acked-by: Michael Jones <michael.jones@matrix-vision.de>
-rw-r--r--board/matrix_vision/mvblx/sys_eeprom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/matrix_vision/mvblx/sys_eeprom.c b/board/matrix_vision/mvblx/sys_eeprom.c
index 1a2ac8d6c8..db42987010 100644
--- a/board/matrix_vision/mvblx/sys_eeprom.c
+++ b/board/matrix_vision/mvblx/sys_eeprom.c
@@ -348,7 +348,7 @@ int mac_read_from_eeprom(void)
if (memcmp(&e.mac, "\0\0\0\0\0\0", 6) &&
memcmp(&e.mac, "\xFF\xFF\xFF\xFF\xFF\xFF", 6)) {
- char ethaddr[9];
+ char ethaddr[18];
sprintf(ethaddr, "%02X:%02X:%02X:%02X:%02X:%02X",
e.mac[0],