[syslinux] [PATCH] linux/syslinux.c: Nullify if empty
Gene Cumm
gene.cumm at gmail.com
Sat Jun 19 08:19:16 PDT 2010
From: Gene Cumm <gene.cumm at gmail.com>
linux/syslinux.c: Nullify subdir if empty as it converts to "(null)"
with printf variants, yielding the wrong path for ldlinux_path and
ldlinux_name.
Signed-off-by: Gene Cumm <gene.cumm at gmail.com>
---
diff --git a/linux/syslinux.c b/linux/syslinux.c
index 8db9cdd..470157e 100644
--- a/linux/syslinux.c
+++ b/linux/syslinux.c
@@ -288,6 +288,9 @@ int main(int argc, char *argv[])
if (!subdir) {
perror(program);
exit(1);
+ } else if (strlen(subdir) == 0) {
+ free(subdir);
+ subdir = NULL;
}
if (!opt.device)
More information about the Syslinux
mailing list