+2012-02-10 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/commands/legacycfg.c (grub_cmd_legacy_kernel):
+ Avoid improper use of strings.
+ (grub_cmd_legacy_initrdnounzip): Likewise.
+
2012-02-10 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/emu/misc.h (grub_util_warn): Add missing format
}
else
{
+ char rbuf[3] = "-r";
bsdargc = cutargc + 2;
bsdargs = grub_malloc (sizeof (bsdargs[0]) * bsdargc);
grub_memcpy (bsdargs, args, argc * sizeof (bsdargs[0]));
- bsdargs[argc] = "-r";
+ bsdargs[argc] = rbuf;
bsdargs[argc + 1] = bsddevname;
grub_snprintf (bsddevname, sizeof (bsddevname),
"wd%d%c", bsd_device,
{
char **newargs;
grub_err_t err;
+ char nounzipbuf[10] = "--nounzip";
newargs = grub_malloc ((argc + 1) * sizeof (newargs[0]));
if (!newargs)
return grub_errno;
grub_memcpy (newargs + 1, args, argc * sizeof (newargs[0]));
- newargs[0] = "--nounzip";
+ newargs[0] = nounzipbuf;
cmd = grub_command_find ("module");
if (!cmd)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "command module not found");