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@linux-m68k.org>
This commit is contained in:
Geert Uytterhoeven 2013-02-12 10:06:12 +01:00
parent e42e3980ad
commit de666cf0a6

View file

@ -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;