OSDN Git Service

* i386-stub.c (getpacket): Fix array overflow.
authorDaniel Jacobowitz <dan@debian.org>
Thu, 30 Mar 2006 16:44:12 +0000 (16:44 +0000)
committerDaniel Jacobowitz <dan@debian.org>
Thu, 30 Mar 2006 16:44:12 +0000 (16:44 +0000)
* m32r-stub.c (getpacket): Likewise.
* m68k-stub.c (getpacket): Likewise.
* sh-stub.c (getpacket): Likewise.
* sparc-stub.c (getpacket): Likewise.

gdb/ChangeLog
gdb/i386-stub.c
gdb/m32r-stub.c
gdb/m68k-stub.c
gdb/sh-stub.c
gdb/sparc-stub.c

index 87c7974..799f737 100644 (file)
@@ -1,3 +1,11 @@
+2006-03-30  Adrien Kunysz  <a_kunysz@yahoo.com>
+
+       * 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  <dan@codesourcery.com>
  
        * frame.h (set_current_sal_from_frame): New prototype.
index 1251567..6b91296 100644 (file)
@@ -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 == '$')
index c7033ea..4d54f72 100644 (file)
@@ -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 == '$')
index 54e06b1..4ef4069 100644 (file)
@@ -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 == '$')
index bdd9e50..76c98a5 100644 (file)
@@ -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 == '$')
index 1e6298a..c12d436 100644 (file)
@@ -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 == '$')