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)