merge from gcc
authorDJ Delorie <dj@redhat.com>
Thu, 5 Jun 2003 17:03:32 +0000 (17:03 +0000)
committerDJ Delorie <dj@redhat.com>
Thu, 5 Jun 2003 17:03:32 +0000 (17:03 +0000)
libiberty/ChangeLog
libiberty/testsuite/test-demangle.c

index af52033..baa15cd 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR other/10810
+       * test-demangle.c (getline): Fix fence-post error.
+
 2003-06-03  Nick Clifton  <nickc@redhat.com>
 
        * asprintf.c: Change comment to note that -1 is returned upon
index 82f263e..6e5d0b4 100644 (file)
@@ -65,7 +65,7 @@ getline(buf)
      line: copy this line into the buffer and return.  */
   while (c != EOF && c != '\n')
     {
-      if (count >= alloc)
+      if (count + 1 >= alloc)
        {
          alloc *= 2;
          data = xrealloc (data, alloc);