提交 de666cf0 编写于 作者: G Geert Uytterhoeven

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: NGeert Uytterhoeven <geert@linux-m68k.org>
上级 e42e3980
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册