This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Fix bfd_read to cope with bad BIMs
- To: nickc at cygnus dot com
- Subject: Re: Fix bfd_read to cope with bad BIMs
- From: DJ Delorie <dj at delorie dot com>
- Date: Fri, 21 Jan 2000 15:18:32 -0500
- CC: binutils at sourceware dot cygnus dot com
- References: <200001211833.KAA08203@elmo.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.
Note that bfd_in_memory support is very weak and many aspects of it
fail. While it's good to fix these bugs, beware of a false sense of
security. It barely worked enough for the dll stuff I added back
when, and that was after I added support for things I needed it to do.
> Is this patch OK to apply ?
Looks OK to me.