From 45a123ac6e0091050ae126d0a4654d3c534d56c0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 3 May 2008 12:51:08 +0200 Subject: [PATCH] avoid failed assertion with tight malloc * tests/test-getndelim2.c: Correct an off-by-one assertion. --- ChangeLog | 5 +++++ tests/test-getndelim2.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f566efa11..ec7d2959d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-03 Jim Meyering + + avoid failed assertion with tight malloc + * tests/test-getndelim2.c: Correct an off-by-one assertion. + 2008-05-03 Simon Josefsson * m4/inet_pton.m4: Set HAVE_DECL_INET_PTON to 0 when declarations diff --git a/tests/test-getndelim2.c b/tests/test-getndelim2.c index 10ec1d8e6..d1eb12af3 100644 --- a/tests/test-getndelim2.c +++ b/tests/test-getndelim2.c @@ -138,7 +138,7 @@ main (int argc, char **argv) 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); -- 2.11.0