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:
parent
e42e3980ad
commit
de666cf0a6
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue