Fix bfd_read to cope with bad BIMs
Ian Lance Taylor
ian@zembu.com
Fri Jan 21 10:46:00 GMT 2000
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
More information about the Binutils
mailing list