[syslinux] [PATCH 04/12] elflink: Don't pass NULL to spawn_load()

Matt Fleming matt at console-pimps.org
Wed Mar 9 08:00:15 PST 2011


From: Matt Fleming <matt.fleming at linux.intel.com>

As spawn_load() dereferences the 'argv' parameter it really doesn't
expect it to be NULL.

Signed-off-by: Matt Fleming <matt.fleming at linux.intel.com>
---
 com32/lib/sys/module/exec.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/com32/lib/sys/module/exec.c b/com32/lib/sys/module/exec.c
index 30a61c0..0e7aa3f 100644
--- a/com32/lib/sys/module/exec.c
+++ b/com32/lib/sys/module/exec.c
@@ -387,8 +387,10 @@ int module_load_dependencies(const char *name,const char *dep_file)
 		i++;	/* skip a space */
 
 		if (strlen(temp_name)) {
+			char *argv[2] = { NULL, NULL };
+
 			module_load_dependencies(temp_name, MODULES_DEP);
-			if (spawn_load(temp_name, NULL) < 0)
+			if (spawn_load(temp_name, argv) < 0)
 				continue;
 		}
 	}
-- 
1.7.4




More information about the Syslinux mailing list