From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17955 invoked by alias); 3 Mar 2011 19:12:41 -0000 Received: (qmail 17911 invoked by uid 22791); 3 Mar 2011 19:12:40 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Mar 2011 19:12:35 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id B3D7D13484; Thu, 3 Mar 2011 11:12:34 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost3.vmware.com (Postfix) with ESMTP id A92FCCD960; Thu, 3 Mar 2011 11:12:34 -0800 (PST) Message-ID: <4D6FE822.3080808@vmware.com> Date: Thu, 03 Mar 2011 19:12:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: nickc@redhat.com, bug-binutils@gnu.org, "gdb-patches@sourceware.org" Subject: [RFA] coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error? Content-Type: multipart/mixed; boundary="------------020301020000080609040903" X-IsSubscribed: yes 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 X-SW-Source: 2011-03/txt/msg00203.txt.bz2 This is a multi-part message in MIME format. --------------020301020000080609040903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 81 If rel-r_type is equal to ARRA_SIZE, it will overflow the array. What say you? --------------020301020000080609040903 Content-Type: text/plain; name="coff-x86-64.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="coff-x86-64.txt" Content-length: 663 2011-03-03 Michael Snyder * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error. Index: coff-x86_64.c =================================================================== RCS file: /cvs/src/src/bfd/coff-x86_64.c,v retrieving revision 1.12 diff -u -p -u -p -r1.12 coff-x86_64.c --- coff-x86_64.c 31 Mar 2010 16:32:02 -0000 1.12 +++ coff-x86_64.c 3 Mar 2011 19:07:58 -0000 @@ -546,7 +546,7 @@ coff_amd64_rtype_to_howto (bfd *abfd ATT { reloc_howto_type *howto; - if (rel->r_type > ARRAY_SIZE (howto_table)) + if (rel->r_type >= ARRAY_SIZE (howto_table)) { bfd_set_error (bfd_error_bad_value); return NULL; --------------020301020000080609040903--