diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2003-06-05 16:38:22 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2003-06-05 16:38:22 +0000 |
commit | 8191fe819a20f35e2a24df0944ca904347f4a496 (patch) | |
tree | cc640d953214b4f7a541a52ed4920eaf0e3fc069 | |
parent | 8f231b5d874dcb328c5bbd73519ef7dfbe41c843 (diff) | |
download | gcc-8191fe819a20f35e2a24df0944ca904347f4a496.zip gcc-8191fe819a20f35e2a24df0944ca904347f4a496.tar.gz gcc-8191fe819a20f35e2a24df0944ca904347f4a496.tar.bz2 |
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: r67499
-rw-r--r-- | libiberty/ChangeLog | 5 | ||||
-rw-r--r-- | libiberty/testsuite/test-demangle.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index af52033..baa15cd 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-06-03 Nick Clifton <nickc@redhat.com> * 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 82f263e..6e5d0b4 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); |