[Patch 3/4]: Rewrite of the alpha-vms bfd back-end (ld)
Nick Clifton
nickc@redhat.com
Tue Apr 13 17:00:00 GMT 2010
Hi Tristan,
>>> + string = (char *) xmalloc (strlen (search->name)
>>> + + strlen (entry->filename)
>>> + + sizeof "/.exe");
>>> +
>>> + sprintf (string, "%s/%s.exe", search->name, entry->filename);
>>
>> What about the zero-terminator for the string ? Ie this looks like a possible memory corruption bug to me.
>
> Isn't sizeof ("./exe") == 6 (ie, strlen + 1) ?
Mea culpa. You're right. Patch approved.
Cheers
Nick
More information about the Binutils
mailing list