From: <liqingqing3@huawei.com>
To: <libc-alpha@sourceware.org>
Cc: <hushiyuan@huawei.com>
Subject: [PATCH] math: enhance the endloop condition of function handle_input_flag found that the endloop condition is not correct, cause when the loop variable " i " euqal to 16, than the input_flags[16] will be out of bounds. though i think for now the inputs maybe all right, but just enhanced it.
Date: Wed, 23 Oct 2019 10:47:00 -0000 [thread overview]
Message-ID: <20191023104737.1048-1-liqingqing3@huawei.com> (raw)
From: l00283554 <liqingqing3@huawei.com>
---
math/gen-auto-libm-tests.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/math/gen-auto-libm-tests.c b/math/gen-auto-libm-tests.c
index f15af29..08684c4 100644
--- a/math/gen-auto-libm-tests.c
+++ b/math/gen-auto-libm-tests.c
@@ -1298,7 +1298,7 @@ handle_input_flag (char *arg, input_flag *flag,
char c = *ep;
*ep = 0;
bool found = false;
- for (input_flag_type i = flag_first_flag; i <= num_input_flag_types; i++)
+ for (input_flag_type i = flag_first_flag; i < num_input_flag_types; i++)
{
if (strcmp (arg, input_flags[i]) == 0)
{
--
2.6.4.windows.1
next reply other threads:[~2019-10-23 10:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-23 10:47 liqingqing3 [this message]
2019-10-23 11:06 ` Florian Weimer
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=20191023104737.1048-1-liqingqing3@huawei.com \
--to=liqingqing3@huawei.com \
--cc=hushiyuan@huawei.com \
--cc=libc-alpha@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: link
Be 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).