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:
parent
1aaab00d88
commit
cc87d18a6e
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user