[Patch 3/4]: Rewrite of the alpha-vms bfd back-end (ld)
Tristan Gingold
gingold@adacore.com
Wed Apr 14 09:30:00 GMT 2010
On Apr 13, 2010, at 7:00 PM, Nick Clifton wrote:
> 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.
Thanks, committed.
Tristan.
More information about the Binutils
mailing list