diff mbox

[U-Boot,7/9] board/renesas/ecovec/ecovec.c: fix buffer overflow

Message ID 1415278985-8482-8-git-send-email-wd@denx.de
State Accepted
Delegated to: Nobuhiro Iwamatsu
Headers show

Commit Message

Wolfgang Denk Nov. 6, 2014, 1:03 p.m. UTC
Fix error detected by cppcheck:

[board/renesas/ecovec/ecovec.c:66]: (error) Buffer is accessed out of
bounds.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
---
 board/renesas/ecovec/ecovec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nobuhiro Iwamatsu Nov. 9, 2014, 11:52 p.m. UTC | #1
2014-11-06 22:03 GMT+09:00 Wolfgang Denk <wd@denx.de>:
> Fix error detected by cppcheck:
>
> [board/renesas/ecovec/ecovec.c:66]: (error) Buffer is accessed out of
> bounds.
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
> ---
>  board/renesas/ecovec/ecovec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/renesas/ecovec/ecovec.c b/board/renesas/ecovec/ecovec.c
> index 2804d91..d862d99 100644
> --- a/board/renesas/ecovec/ecovec.c
> +++ b/board/renesas/ecovec/ecovec.c
> @@ -41,7 +41,7 @@ static void debug_led(u8 led)
>  int board_late_init(void)
>  {
>         u8 mac[6];
> -       char env_mac[17];
> +       char env_mac[18];
>
>         udelay(1000);
>
> --
> 1.8.3.1
>

Applied, thanks.

Best regards,
  Nobuhiro
diff mbox

Patch

diff --git a/board/renesas/ecovec/ecovec.c b/board/renesas/ecovec/ecovec.c
index 2804d91..d862d99 100644
--- a/board/renesas/ecovec/ecovec.c
+++ b/board/renesas/ecovec/ecovec.c
@@ -41,7 +41,7 @@  static void debug_led(u8 led)
 int board_late_init(void)
 {
 	u8 mac[6];
-	char env_mac[17];
+	char env_mac[18];
 
 	udelay(1000);