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 12:53 PM, Nick Clifton wrote:
> Hi Tristan,
>
> A couple of minor points:
>
>> diff --git a/ld/emultempl/vms.em b/ld/emultempl/vms.em
>> new file mode 100644
>> index 0000000..ec52de7
>> --- /dev/null
>> +++ b/ld/emultempl/vms.em
>> @@ -0,0 +1,123 @@
>> +# This shell script emits a C file. -*- C -*-
>> +# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
>
> You really only need 2010 listed as a copyright year here.
Sure.
>
>> + 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) ?
Tristan.