]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
suppress shell expansion inside quoted strings
authorBVK Chaitanya <bvk.groups@gmail.com>
Sun, 7 Nov 2010 10:43:14 +0000 (16:13 +0530)
committerBVK Chaitanya <bvk.groups@gmail.com>
Sun, 7 Nov 2010 10:43:14 +0000 (16:13 +0530)
grub-core/script/execute.c
tests/grub_cmd_echo.in

index d859a13bdc930c5fae591a03059732e2b9e959ec..72d1997602d96fd0f2681488fba57346e9859fcb 100644 (file)
@@ -374,7 +374,7 @@ grub_script_arglist_to_argv (struct grub_script_arglist *arglist,
 
            case GRUB_SCRIPT_ARG_TYPE_DQSTR:
            case GRUB_SCRIPT_ARG_TYPE_SQSTR:
-             if (grub_script_argv_append (&result, arg->str))
+             if (append (arg->str, 1))
                goto fail;
              break;
            }
index 6ac33f55e6470b01dfae306ed921340ff460c03a..902696778d86b1f6a2c2bf8ac20b87aaa988d268 100644 (file)
@@ -31,3 +31,11 @@ echo foo -n
 echo foo -n -e
 
 echo -------
+
+if test -n "$grubshell"; then insmod regexp; fi
+
+echo '*'
+echo "*"
+
+foo="*"
+echo "$foo"