diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-05-01 16:00:12 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-05-01 16:00:12 +0100 |
commit | 254db41a8b0cf5f92bd6ff3f3e20bbd64ede071e (patch) | |
tree | b371e4bf3cee0232a61f5c06defe8894521d869d | |
parent | 34ec5204dc2f2e6130f611b0710d475f7dd9d609 (diff) | |
download | syslinux-254db41a8b0cf5f92bd6ff3f3e20bbd64ede071e.tar.gz syslinux-254db41a8b0cf5f92bd6ff3f3e20bbd64ede071e.tar.xz syslinux-254db41a8b0cf5f92bd6ff3f3e20bbd64ede071e.zip |
ldlinux: Don't drop args if we auto-lookup cmd extension
If we automatically lookup the extension for a command and the user
has supplied an argument to that command we incorrectly stamp the NUL
byte after the extension, and not after the argument, thereby
effectively erasing the argument.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | com32/elflink/ldlinux/ldlinux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/elflink/ldlinux/ldlinux.c b/com32/elflink/ldlinux/ldlinux.c index da93c544..18915262 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; } |