* 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> 2012-06-21 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Fix double * 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; break;
case GRUB_SCRIPT_ARG_TYPE_BLOCK: case GRUB_SCRIPT_ARG_TYPE_BLOCK:
if (grub_script_argv_append (&result, "{", 1) {
|| grub_script_argv_append (&result, arg->str, char *p;
grub_strlen (arg->str)) if (grub_script_argv_append (&result, "{", 1))
|| grub_script_argv_append (&result, "}", 1)) goto fail;
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; result.script = arg->script;
break; break;