From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2359 invoked by alias); 3 Mar 2011 18:25:40 -0000 Received: (qmail 2326 invoked by uid 22791); 3 Mar 2011 18:25:39 -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-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Mar 2011 18:25:33 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id DF00B390F2; Thu, 3 Mar 2011 10:25:31 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost4.vmware.com (Postfix) with ESMTP id D6EFBC9E57; Thu, 3 Mar 2011 10:25:31 -0800 (PST) Message-ID: <4D6FDD1B.1010501@vmware.com> Date: Thu, 03 Mar 2011 18:25:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: nickc@redhat.com, "gdb-patches@sourceware.org" , bug-binutils@gnu.org Subject: [RFA] aoutx.h, aout_final_link, use sizeof int Content-Type: multipart/mixed; boundary="------------070204020902040609040200" 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/msg00198.txt.bz2 This is a multi-part message in MIME format. --------------070204020902040609040200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 83 Nick, Seems to me it should be sizeof int, not int*. What do you think? Michael --------------070204020902040609040200 Content-Type: text/plain; name="aoutx.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="aoutx.txt" Content-length: 962 2011-03-03 Michael Snyder * aoutx.txt (aout_final_link): Use sizeof int not sizeof int*. Index: aoutx.h =================================================================== RCS file: /cvs/src/src/bfd/aoutx.h,v retrieving revision 1.85 diff -u -p -u -p -r1.85 aoutx.h --- aoutx.h 13 Dec 2010 01:06:15 -0000 1.85 +++ aoutx.h 3 Mar 2011 18:22:42 -0000 @@ -5448,7 +5448,7 @@ NAME (aout, final_link) (bfd *abfd, /* Allocate buffers to hold section contents and relocs. */ aout_info.contents = (bfd_byte *) bfd_malloc (max_contents_size); aout_info.relocs = bfd_malloc (max_relocs_size); - aout_info.symbol_map = (int *) bfd_malloc (max_sym_count * sizeof (int *)); + aout_info.symbol_map = (int *) bfd_malloc (max_sym_count * sizeof (int)); aout_info.output_syms = (struct external_nlist *) bfd_malloc ((max_sym_count + 1) * sizeof (struct external_nlist)); if ((aout_info.contents == NULL && max_contents_size != 0) --------------070204020902040609040200--