From b4c6b6f4af96a73a4ee914c69acea75989308b18 Mon Sep 17 00:00:00 2001 From: danglin Date: Thu, 5 Jun 2003 16:38:22 +0000 Subject: [PATCH] PR other/10810 * test-demangle.c (getline): Fix fence-post error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67499 138bc75d-0d04-0410-961f-82ee72b054a4 --- libiberty/ChangeLog | 5 +++++ libiberty/testsuite/test-demangle.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index af52033a23d..baa15cd6882 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2003-06-05 John David Anglin + + PR other/10810 + * test-demangle.c (getline): Fix fence-post error. + 2003-06-03 Nick Clifton * asprintf.c: Change comment to note that -1 is returned upon 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); -- 2.11.4.GIT