public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Sunil Pandey <skpgkp2@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] String: Improve overflow test coverage for strnlen Date: Wed, 25 May 2022 23:06:06 +0000 (GMT) [thread overview] Message-ID: <20220525230606.DEA263856DCA@sourceware.org> (raw) 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);
reply other threads:[~2022-05-25 23:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220525230606.DEA263856DCA@sourceware.org \ --to=skpgkp2@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).