This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Make solib-frv.c work in a non-FDPIC environment


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]