This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

Re: Fix bfd_read to cope with bad BIMs


   Date: Fri, 21 Jan 2000 10:33:49 -0800
   From: Nick Clifton <nickc@cygnus.com>

     The patch below fixes a small bug in bfd_read().  If a bfd_in_memory
     structure has a "size" field that is less than the value of
     "abfd->where" then the code would attempt to memcpy() a negative sized
     amount of data, resulting in a segmentation fault.

     Is this patch OK to apply ?

Yes, but there is probably another bug.  bfd_seek should not let you
set the abfd->where field of a BFD_IN_MEMORY BFD to an invalid value.

Ian


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