From: Sunil K Pandey Date: Wed, 25 May 2022 20:43:36 +0000 (-0700) Subject: String: Improve overflow test coverage for strnlen X-Git-Tag: glibc-2.36~241 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7597b251d451fa099686344bbd9915bd481ba55b;p=thirdparty%2Fglibc.git String: Improve overflow test coverage for strnlen This patch adds more overflow test coverage for strnlen and wcsnlen. Reviewed-by: H.J. Lu --- diff --git a/string/test-strnlen.c b/string/test-strnlen.c index 83c4502b9ab..4a9375112ad 100644 --- a/string/test-strnlen.c +++ b/string/test-strnlen.c @@ -96,6 +96,8 @@ do_overflow_tests (void) for (i = 0; i < 750; ++i) { + do_test (1, i, SIZE_MAX, BIG_CHAR); + do_test (0, i, SIZE_MAX - i, BIG_CHAR); do_test (0, i, i - buf_addr, BIG_CHAR); do_test (0, i, -buf_addr - i, BIG_CHAR);