mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-22 06:32:23 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -348,7 +348,7 @@ int mac_read_from_eeprom(void)
|
||||||
|
|
||||||
if (memcmp(&e.mac, "\0\0\0\0\0\0", 6) &&
|
if (memcmp(&e.mac, "\0\0\0\0\0\0", 6) &&
|
||||||
memcmp(&e.mac, "\xFF\xFF\xFF\xFF\xFF\xFF", 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",
|
sprintf(ethaddr, "%02X:%02X:%02X:%02X:%02X:%02X",
|
||||||
e.mac[0],
|
e.mac[0],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue