aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2003-06-05 17:44:59 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2003-06-05 17:44:59 +0000
commit1f71133f30eba584b213aba7c6a62480bf92e67b (patch)
tree5283a540576a128c9e5f9a445461619c16ed4b7e /libiberty
parentf85cdf7fb59a40c8da20bed57e7a7aefeaab3966 (diff)
re PR other/10810 (gcc-3.3 fails make check: buffer overrun in test_demangle.c)
PR other/10810 * test-demangle.c (getline): Fix fence-post error. From-SVN: r67503
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/testsuite/test-demangle.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 837b45fd554..6c60a3d30cb 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -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-05-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Backport from mainline:
diff --git a/libiberty/testsuite/test-demangle.c b/libiberty/testsuite/test-demangle.c
index 82f263e88af..6e5d0b4b973 100644
--- a/libiberty/testsuite/test-demangle.c
+++ b/libiberty/testsuite/test-demangle.c
@@ -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);