From: Michael Jones <michael.jones@matrix-vision.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/9] board/matrix_vision/mvblx/sys_eeprom.c: fix buffer overflow
Date: Thu, 06 Nov 2014 14:50:33 +0100 [thread overview]
Message-ID: <545B7CA9.8040208@matrix-vision.de> (raw)
In-Reply-To: <1415278985-8482-7-git-send-email-wd@denx.de>
On 11/06/2014 02:03 PM, Wolfgang Denk wrote:
> 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>
> ---
> board/matrix_vision/mvblx/sys_eeprom.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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],
>
Thanks for the fix.
Acked-by: Michael Jones <michael.jones@matrix-vision.de>
-----------------------------------------------------------------
VISION 2014 in Stuttgart | 04.11.2014 - 06.11.2014
Meet us at the VISION show Hall 1 - Stand E12
-----------------------------------------------------------------
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Uwe Furtner, Erhard Meier
next prev parent reply other threads:[~2014-11-06 13:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 13:02 [U-Boot] [PATCH 0/9] cppcheck cleanup Wolfgang Denk
2014-11-06 13:02 ` [U-Boot] [PATCH 1/9] cppcheck cleanup: fix nullPointer errors Wolfgang Denk
2014-11-10 21:27 ` [U-Boot] [U-Boot,1/9] " Tom Rini
2014-11-06 13:02 ` [U-Boot] [PATCH 2/9] board/cogent/lcd.c: fix syntax error Wolfgang Denk
2014-11-10 21:28 ` [U-Boot] [U-Boot,2/9] " Tom Rini
2014-11-06 13:02 ` [U-Boot] [PATCH 3/9] drivers/usb/host/isp116x-hcd.c: " Wolfgang Denk
2014-11-06 13:23 ` Marek Vasut
2014-11-06 13:03 ` [U-Boot] [PATCH 4/9] drivers/net/uli526x.c: " Wolfgang Denk
2014-11-10 21:28 ` [U-Boot] [U-Boot,4/9] " Tom Rini
2014-11-06 13:03 ` [U-Boot] [PATCH 5/9] common/cmd_fitupd.c: restore corrupted file Wolfgang Denk
2014-11-10 21:28 ` [U-Boot] [U-Boot, " Tom Rini
2014-11-06 13:03 ` [U-Boot] [PATCH 6/9] board/matrix_vision/mvblx/sys_eeprom.c: fix buffer overflow Wolfgang Denk
2014-11-06 13:50 ` Michael Jones [this message]
2014-11-10 21:28 ` [U-Boot] [U-Boot, " Tom Rini
2014-11-06 13:03 ` [U-Boot] [PATCH 7/9] board/renesas/ecovec/ecovec.c: " Wolfgang Denk
2014-11-09 23:52 ` Nobuhiro Iwamatsu
2014-11-06 13:03 ` [U-Boot] [PATCH 8/9] ARM: MXS: fix Uninitialized variable error Wolfgang Denk
2014-11-10 21:28 ` [U-Boot] [U-Boot, " Tom Rini
2014-11-06 13:03 ` [U-Boot] [PATCH 9/9] board/esd/common/auto_update.c: fix Uninitialized variable Wolfgang Denk
2014-11-06 13:33 ` Matthias Fuchs
2014-11-10 21:28 ` [U-Boot] [U-Boot, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=545B7CA9.8040208@matrix-vision.de \
--to=michael.jones@matrix-vision.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.