Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/string Fix off-by-one in strlen_huge testcase.
details: https://anonhg.NetBSD.org/src/rev/0fe3220f4ca7
branches: trunk
changeset: 767231:0fe3220f4ca7
user: njoly <njoly%NetBSD.org@localhost>
date: Tue Jul 12 12:08:07 2011 +0000
description:
Fix off-by-one in strlen_huge testcase.
diffstat:
tests/lib/libc/string/t_strlen.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r ca4bfaa1c480 -r 0fe3220f4ca7 tests/lib/libc/string/t_strlen.c
--- a/tests/lib/libc/string/t_strlen.c Tue Jul 12 08:52:17 2011 +0000
+++ b/tests/lib/libc/string/t_strlen.c Tue Jul 12 12:08:07 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_strlen.c,v 1.3 2011/07/07 09:31:27 jruoho Exp $ */
+/* $NetBSD: t_strlen.c,v 1.4 2011/07/12 12:08:07 njoly Exp $ */
/*
* Written by J.T. Conklin <jtc%acorntoolworks.com@localhost>
@@ -159,7 +159,7 @@
continue;
(void)memset(str, 'x', i * page);
- str[i * page + 1] = '\0';
+ str[i * page] = '\0';
ATF_REQUIRE(strlen(str) == i * page);
free(str);
Home |
Main Index |
Thread Index |
Old Index