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>
This commit is contained in:
Wolfgang Denk 2014-11-06 14:03:02 +01:00 committed by Tom Rini
parent 1aaab00d88
commit cc87d18a6e

View File

@ -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],