From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19669 invoked by alias); 18 Mar 2016 14:54:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 19654 invoked by uid 89); 18 Mar 2016 14:54:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=1756, 58ca, 942b, 4ED5 X-HELO: mail-out.m-online.net Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 18 Mar 2016 14:54:29 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3qRSt95Sw0z3hjd0; Fri, 18 Mar 2016 15:54:25 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3qRSt91PGFzvhMw; Fri, 18 Mar 2016 15:54:25 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id m17IWWbMgZAz; Fri, 18 Mar 2016 15:54:24 +0100 (CET) X-Auth-Info: x+S9RbT+YiyXo1mRi1Y+fBLiW9IitUsb8wa/DgK6/hAZMt/MeoaI1oVJj7ao8fe+ Received: from igel.home (ppp-88-217-4-62.dynamic.mnet-online.de [88.217.4.62]) by mail.mnet-online.de (Postfix) with ESMTPA; Fri, 18 Mar 2016 15:54:24 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id E764F2C336C; Fri, 18 Mar 2016 15:54:23 +0100 (CET) From: Andreas Schwab To: Nick Clifton Cc: gdb-patches@sourceware.org Subject: Re: Commit: AArch64 sim: Fix off by one error checking for invalid vector array element References: <87fuvnu9q7.fsf@redhat.com> X-Yow: I'll clean your ROOM!! I know some GOOD stories, too!! All about ROAD Island's, HUSH Puppies, and how LUKE finds GOLD on his LAND!! Date: Fri, 18 Mar 2016 14:54:00 -0000 In-Reply-To: <87fuvnu9q7.fsf@redhat.com> (Nick Clifton's message of "Fri, 18 Mar 2016 14:44:16 +0000") Message-ID: <87r3f7n8f4.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2016-03/txt/msg00337.txt.bz2 Nick Clifton writes: > diff --git a/sim/aarch64/cpustate.c b/sim/aarch64/cpustate.c > index 86b1b15..19f485e 100644 > --- a/sim/aarch64/cpustate.c > +++ b/sim/aarch64/cpustate.c > @@ -345,7 +345,7 @@ aarch64_set_FP_long_double (sim_cpu *cpu, VReg reg, FRegister a) > #define GET_VEC_ELEMENT(REG, ELEMENT, FIELD) \ > do \ > { \ > - if (element > ARRAY_SIZE (cpu->fr[0].FIELD)) \ > + if (element >= ARRAY_SIZE (cpu->fr[0].FIELD)) \ s/element/ELEMENT/ Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."