Mercurial > hg > octave-lyh > gnulib-hg
changeset 10033:24328ed2c4f6
avoid failed assertion with tight malloc
* tests/test-getndelim2.c: Correct an off-by-one assertion.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Sat, 03 May 2008 12:51:08 +0200 |
parents | 3e6530c5e7c2 |
children | 755ab2f17a87 |
files | ChangeLog tests/test-getndelim2.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-03 Jim Meyering <meyering@redhat.com> + + avoid failed assertion with tight malloc + * tests/test-getndelim2.c: Correct an off-by-one assertion. + 2008-05-03 Simon Josefsson <simon@josefsson.org> * m4/inet_pton.m4: Set HAVE_DECL_INET_PTON to 0 when declarations
--- a/tests/test-getndelim2.c +++ b/tests/test-getndelim2.c @@ -138,7 +138,7 @@ result = getndelim2 (&line, &len, 0, GETNLINE_NO_LIMIT, 'g', 'f', f); ASSERT (result == 501 * 14 - 1); - ASSERT (501 * 14 < len); + ASSERT (501 * 14 <= len); buffer[499] = 'f'; buffer[500] = '\0'; ASSERT (strcmp (buffer, line + 501 * 13) == 0);