This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch 3/4]: Rewrite of the alpha-vms bfd back-end (ld)
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.