[syslinux:elflink] ldlinux: Fixup lwip merge botch

syslinux-bot for Matt Fleming matt.fleming at intel.com
Wed Mar 20 08:06:12 PDT 2013


Commit-ID:  ba45539416c804ed65a129ae3fd07f585f6a61ff
Gitweb:     http://www.syslinux.org/commit/ba45539416c804ed65a129ae3fd07f585f6a61ff
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Fri, 15 Mar 2013 16:32:52 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Fri, 15 Mar 2013 17:16:29 +0000

ldlinux: Fixup lwip merge botch

The lwip merge changed the code for copying cmdline arguments from,

    strcpy(q, p);

to this,

    do {
	*q++ = ch = *p++;
    } while (ch);

which means 'p' no longer points at 'args'. Use 'args' explicitly for
the case where we need to apply a filename extension, otherwise users
end up seeing errors like,

    Failed to load COM32 file .c32

Reported-by: Mattias Schlenker <ms at mattiasschlenker.de>
Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 com32/elflink/ldlinux/execute.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/com32/elflink/ldlinux/execute.c b/com32/elflink/ldlinux/execute.c
index 49a0de5..bf0bd8c 100644
--- a/com32/elflink/ldlinux/execute.c
+++ b/com32/elflink/ldlinux/execute.c
@@ -101,6 +101,7 @@ __export void execute(const char *cmdline, uint32_t type, bool sysappend)
 				 * filename extension if COM32 and
 				 * retry.
 				 */
+				p = args;
 				if (t->type == IMAGE_TYPE_COM32) {
 					p = apply_extension(p, ".c32");
 					if (!p)


More information about the Syslinux-commits mailing list