From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32644 invoked by alias); 15 Nov 2008 16:15:26 -0000 Received: (qmail 32612 invoked by uid 22791); 15 Nov 2008 16:15:25 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 15 Nov 2008 16:14:45 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 0AA7010C35; Sat, 15 Nov 2008 16:14:44 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id E79CD10544; Sat, 15 Nov 2008 16:14:43 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1L1NnH-0005DE-8r; Sat, 15 Nov 2008 11:14:43 -0500 Date: Sat, 15 Nov 2008 22:50:00 -0000 From: Daniel Jacobowitz To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Make solib-frv.c work in a non-FDPIC environment Message-ID: <20081115161443.GB19656@caradoc.them.org> Mail-Followup-To: Kevin Buettner , gdb-patches@sourceware.org References: <20081114162103.05241f81@mesquite.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081114162103.05241f81@mesquite.lan> User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2008-11/txt/msg00387.txt.bz2 On Fri, Nov 14, 2008 at 04:21:03PM -0700, Kevin Buettner wrote: > + if (nsegs < 0) > + return NULL; > + > /* Allocate space for the complete (external) loadmap. */ > ext_ldmbuf_size = sizeof (struct ext_elf32_fdpic_loadmap) > + (nsegs - 1) * sizeof (struct ext_elf32_fdpic_loadseg); <= 0? I realize it's probably OK in practice, assuming ext_elf32_fdpic_loadmap has a trailing [1] array, but allocating less than the size of the array would be strange. Otherwise sounds good. -- Daniel Jacobowitz CodeSourcery