mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-29 10:39:22 +00:00
Fix handling of leading spaces in scripts.
* grub-core/normal/cmdline.c (grub_cmdline_get): Don't strip leading spaces. * grub-core/normal/main.c (grub_file_getline): Remove all preprocessing other than skipping \r. All users updated. * tests/grub_script_echo1.in: Add space-related tests. * util/grub-menulst2cfg.c (main): Remove useless space skipping.
This commit is contained in:
1 parent
1a1ac4f6cb
commit
9fdb2d7b11
10 files changed
+104
-66
No files matched your search
@@ -80,12 +80,9 @@ main (int argc, char **argv)
|
||||
{
|
||||
char *oldname = NULL;
|
||||
char *newsuffix;
|
||||
char *ptr;
|
||||
|
||||
for (ptr = buf; *ptr && grub_isspace (*ptr); ptr++);
|
||||
|
||||
oldname = entryname;
|
||||
parsed = grub_legacy_parse (ptr, &entryname, &newsuffix);
|
||||
parsed = grub_legacy_parse (buf, &entryname, &newsuffix);
|
||||
if (newsuffix)
|
||||
{
|
||||
suffixlen += strlen (newsuffix);
|
||||
|
||||
Reference in new issue
Block a user