OSDN Git Service

PR other/10810
[pf3gnuchains/gcc-fork.git] / libiberty / testsuite / test-demangle.c
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);