From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41450 invoked by alias); 23 Oct 2019 10:47:54 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 41440 invoked by uid 89); 23 Oct 2019 10:47:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: huawei.com From: To: CC: 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 Message-ID: <20191023104737.1048-1-liqingqing3@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-SW-Source: 2019-10/txt/msg00677.txt.bz2 From: l00283554 --- 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