two patches for bugs in BFD/peXXigen.c
Marcus Brinkmann
marcus.brinkmann@ruhr-uni-bochum.de
Tue Sep 7 02:55:00 GMT 2010
On 09/07/2010 01:57 AM, Alan Modra wrote:
> On Mon, Sep 06, 2010 at 01:33:08PM +0200, Marcus Brinkmann wrote:
>> On 09/06/2010 06:53 AM, Alan Modra wrote:
>>> - for (j = 0; j < datasize; j += 8)
>>> + for (j = 0; j < limit_size; j += 8)
>>> {
>>> unsigned long member = bfd_get_32 (abfd, data + idx + j);
>>> unsigned long member_high = bfd_get_32 (abfd, data + idx + j + 4);
>>>
>>> Won't changing the loop endpoint possibly affect reading "member"?
>>
>> That's the whole point of the change. datasize is not a valid limit for the
>> thunk table, at all.
>
> OK, but limit_size is not correct either. When hint_addr != 0
> && first_thunk != hint_addr && ft_section != section you set
> limit_size to something based on ft_section->size, but data points to
> some place within a different section contents. I'm committing the
> following.
Oh yeah, one actually wants the smaller one of the two. I tested your commit
with my kmail-mobile, and it works fine now, thanks a lot! I like the
cleanups, too.
Thanks,
Marcus
More information about the Binutils
mailing list