From: Daniel Jacobowitz Date: Thu, 30 Mar 2006 16:44:12 +0000 (+0000) Subject: * i386-stub.c (getpacket): Fix array overflow. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=295bf0ffc74b3e51101f5b1765dd5f5e2405bd02;p=binutils-gdb.git * i386-stub.c (getpacket): Fix array overflow. * m32r-stub.c (getpacket): Likewise. * m68k-stub.c (getpacket): Likewise. * sh-stub.c (getpacket): Likewise. * sparc-stub.c (getpacket): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 87c7974a219..799f7370837 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2006-03-30 Adrien Kunysz + + * i386-stub.c (getpacket): Fix array overflow. + * m32r-stub.c (getpacket): Likewise. + * m68k-stub.c (getpacket): Likewise. + * sh-stub.c (getpacket): Likewise. + * sparc-stub.c (getpacket): Likewise. + 2006-03-30 Daniel Jacobowitz * frame.h (set_current_sal_from_frame): New prototype. diff --git a/gdb/i386-stub.c b/gdb/i386-stub.c index 1251567e912..6b91296291f 100644 --- a/gdb/i386-stub.c +++ b/gdb/i386-stub.c @@ -474,7 +474,7 @@ getpacket (void) count = 0; /* now, read until a # or end of buffer is found */ - while (count < BUFMAX) + while (count < BUFMAX - 1) { ch = getDebugChar (); if (ch == '$') diff --git a/gdb/m32r-stub.c b/gdb/m32r-stub.c index c7033ea17a3..4d54f72d60b 100644 --- a/gdb/m32r-stub.c +++ b/gdb/m32r-stub.c @@ -605,7 +605,7 @@ getpacket (void) count = 0; /* now, read until a # or end of buffer is found */ - while (count < BUFMAX) + while (count < BUFMAX - 1) { ch = getDebugChar (); if (ch == '$') diff --git a/gdb/m68k-stub.c b/gdb/m68k-stub.c index 54e06b13ccb..4ef4069bc3d 100644 --- a/gdb/m68k-stub.c +++ b/gdb/m68k-stub.c @@ -553,7 +553,7 @@ getpacket (void) count = 0; /* now, read until a # or end of buffer is found */ - while (count < BUFMAX) + while (count < BUFMAX - 1) { ch = getDebugChar (); if (ch == '$') diff --git a/gdb/sh-stub.c b/gdb/sh-stub.c index bdd9e501b86..76c98a5e8ad 100644 --- a/gdb/sh-stub.c +++ b/gdb/sh-stub.c @@ -403,7 +403,7 @@ retry: count = 0; /* now, read until a # or end of buffer is found */ - while (count < BUFMAX) + while (count < BUFMAX - 1) { ch = getDebugChar (); if (ch == '$') diff --git a/gdb/sparc-stub.c b/gdb/sparc-stub.c index 1e6298a179e..c12d4360a4b 100644 --- a/gdb/sparc-stub.c +++ b/gdb/sparc-stub.c @@ -306,7 +306,7 @@ retry: count = 0; /* now, read until a # or end of buffer is found */ - while (count < BUFMAX) + while (count < BUFMAX - 1) { ch = getDebugChar (); if (ch == '$')