/* install unsupported. */
/* ioprobe unsupported. */
/* FIXME: implement command. */
- {"kernel", "legacy_kernel %s '%s' %s\n", 4, {TYPE_TYPE_OR_NOMEM_OPTION,
+ {"kernel", "legacy_kernel %s %s '%s' %s\n", 4, {TYPE_TYPE_OR_NOMEM_OPTION,
TYPE_TYPE_OR_NOMEM_OPTION,
TYPE_FILE,
TYPE_REST_VERBATIM}, 0,
}
for (; grub_isspace (*ptr); ptr++);
curarg = ptr;
- for (; !grub_isspace (*ptr); ptr++);
+ for (; *ptr && !grub_isspace (*ptr); ptr++);
if (i != legacy_commands[cmdnum].argc - 1
|| (legacy_commands[cmdnum].flags & FLAG_IGNORE_REST))
curarglen = ptr - curarg;
ptr = curarg;
while (*ptr)
{
- for (; grub_isspace (*ptr); ptr++);
+ for (; *ptr && grub_isspace (*ptr); ptr++);
for (; *ptr && !grub_isspace (*ptr); ptr++)
if (*ptr == '\\' || *ptr == '\'')
overhead++;
outptr = outptr0;
while (*ptr)
{
- for (; grub_isspace (*ptr); ptr++);
+ for (; *ptr && grub_isspace (*ptr); ptr++);
if (outptr != outptr0)
*outptr++ = ' ';
*outptr++ = '\'';
*outptr++ = '\'';
if (*ptr)
ptr++;
- overhead += 3;
}
*outptr++ = 0;
}
}
}
}
- return grub_xasprintf (legacy_commands[cmdnum].map, args[0], args[1], args[2]);
+
+ return grub_xasprintf (legacy_commands[cmdnum].map, args[0], args[1], args[2],
+ args[3]);
}