* grub-core/script/execute.c (grub_script_arglist_to_argv): Escape

blocks.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-06-21 22:02:09 +02:00
parent 538478d082
commit cde393c9a3
2 changed files with 22 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2012-06-21 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/script/execute.c (grub_script_arglist_to_argv): Escape
blocks.
2012-06-21 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Fix double

View File

@ -642,11 +642,23 @@ grub_script_arglist_to_argv (struct grub_script_arglist *arglist,
break;
case GRUB_SCRIPT_ARG_TYPE_BLOCK:
if (grub_script_argv_append (&result, "{", 1)
|| grub_script_argv_append (&result, arg->str,
grub_strlen (arg->str))
|| grub_script_argv_append (&result, "}", 1))
goto fail;
{
char *p;
if (grub_script_argv_append (&result, "{", 1))
goto fail;
p = wildcard_escape (arg->str);
if (!p)
goto fail;
if (grub_script_argv_append (&result, p,
grub_strlen (p)))
{
grub_free (p);
goto fail;
}
grub_free (p);
if (grub_script_argv_append (&result, "}", 1))
goto fail;
}
result.script = arg->script;
break;