public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] String: Improve overflow test coverage for strnlen
@ 2022-05-25 23:06 Sunil Pandey
  0 siblings, 0 replies; only message in thread
From: Sunil Pandey @ 2022-05-25 23:06 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7597b251d451fa099686344bbd9915bd481ba55b

commit 7597b251d451fa099686344bbd9915bd481ba55b
Author: Sunil K Pandey <skpgkp2@gmail.com>
Date:   Wed May 25 13:43:36 2022 -0700

    String: Improve overflow test coverage for strnlen
    
    This patch adds more overflow test coverage for strnlen and wcsnlen.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Diff:
---
 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-25 23:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 23:06 [glibc] String: Improve overflow test coverage for strnlen Sunil Pandey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).