From 7597b251d451fa099686344bbd9915bd481ba55b Mon Sep 17 00:00:00 2001 From: Sunil K Pandey Date: Wed, 25 May 2022 13:43:36 -0700 Subject: [PATCH] String: Improve overflow test coverage for strnlen This patch adds more overflow test coverage for strnlen and wcsnlen. Reviewed-by: H.J. Lu --- string/test-strnlen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/string/test-strnlen.c b/string/test-strnlen.c index 83c4502b9a..4a9375112a 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); -- 2.11.4.GIT