Commit 8191fe81 by John David Anglin Committed by John David Anglin

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
parent 8f231b5d
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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment