[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1360680777-12622-8-git-send-email-geert@linux-m68k.org>
Date: Tue, 12 Feb 2013 15:52:54 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Mikael Starvik <starvik@...s.com>,
Jesper Nilsson <jesper.nilsson@...s.com>
Cc: linux-cris-kernel@...s.com, linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 07/10] cris/kgdb: Fix buffer overflow in getpacket()
arch/cris/arch-v10/kernel/kgdb.c: In function 'handle_exception':
arch/cris/arch-v10/kernel/kgdb.c:534:17: warning: array subscript is above array bounds [-Warray-bounds]
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
arch/cris/arch-v10/kernel/kgdb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/cris/arch-v10/kernel/kgdb.c b/arch/cris/arch-v10/kernel/kgdb.c
index d0b6257..0e79907 100644
--- a/arch/cris/arch-v10/kernel/kgdb.c
+++ b/arch/cris/arch-v10/kernel/kgdb.c
@@ -523,7 +523,7 @@ getpacket (char *buffer)
xmitcsum = -1;
count = 0;
/* Read until a # or the end of the buffer is reached */
- while (count < BUFMAX) {
+ while (count < BUFMAX - 1) {
ch = getDebugChar ();
if (ch == '#')
break;
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists