diff options
author | Wolfgang Denk <wd@denx.de> | 2014-11-06 13:03:02 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-11-07 21:27:08 (GMT) |
commit | cc87d18a6ec74180784a6b1cdafefeacd8eb1bf2 (patch) | |
tree | b18b650886b4a84e0d350f3127ae0b476171d2fd | |
parent | 1aaab00d8889d7a573f0f13480e274a390c26b06 (diff) | |
download | u-boot-fsl-qoriq-cc87d18a6ec74180784a6b1cdafefeacd8eb1bf2.tar.xz |
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.c | 2 |
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 1a2ac8d..db42987 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], |