[syslinux] [GIT PULL] elflink fixes
H. Peter Anvin
hpa at zytor.com
Fri May 4 12:16:29 PDT 2012
On 05/04/2012 03:05 AM, Matt Fleming wrote:
> diff --git a/com32/elflink/ldlinux/ldlinux.c b/com32/elflink/ldlinux/ldlinux.c
> index da93c54..f11a65c 100644
> --- a/com32/elflink/ldlinux/ldlinux.c
> +++ b/com32/elflink/ldlinux/ldlinux.c
> @@ -124,7 +124,7 @@ static const char *apply_extension(const char *kernel, const char *ext)
> /* Copy the rest of the command line */
> strcpy(k + len + elen, p);
>
> - k[len + elen] = '\0';
> + k[len + elen + strlen(p)] = '\0';
>
> return k;
> }
This confuses me... doesn't this overwrite the NUL byte that strcpy()
has already written?
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
More information about the Syslinux
mailing list