Avoid munging raw spaces when we're escaping command line arguments.

Resolves: rhbz#923374
This commit is contained in:
Peter Jones 2014-06-30 14:20:28 -04:00
parent 011fe811ba
commit f178927fdb
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From ee6df3680adbe2bb8165c98ed0e39f6258cd873e Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 30 Jun 2014 14:16:46 -0400
Subject: [PATCH 126/126] Don't munge raw spaces when we're doing our cmdline
escaping (#923374)
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/lib/cmdline.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/grub-core/lib/cmdline.c b/grub-core/lib/cmdline.c
index 0a5b2af..970ea86 100644
--- a/grub-core/lib/cmdline.c
+++ b/grub-core/lib/cmdline.c
@@ -97,16 +97,7 @@ int grub_create_loader_cmdline (int argc, char *argv[], char *buf,
while (*c)
{
- if (*c == ' ')
- {
- *buf++ = '\\';
- *buf++ = 'x';
- *buf++ = '2';
- *buf++ = '0';
- c++;
- continue;
- }
- else if (*c == '\\' && *(c+1) == 'x' &&
+ if (*c == '\\' && *(c+1) == 'x' &&
is_hex(*(c+2)) && is_hex(*(c+3)))
{
*buf++ = *c++;
--
1.9.3

View File

@ -47,7 +47,7 @@
Name: grub2
Epoch: 1
Version: 2.02
Release: 0.4%{?dist}
Release: 0.5%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
Group: System Environment/Base
@ -185,6 +185,7 @@ Patch0122: 0122-Add-.eh_frame-to-list-of-relocations-stripped.patch
Patch0123: 0123-Make-10_linux-work-with-our-changes-for-linux16-and-.patch
Patch0124: 0124-Don-t-print-during-fdt-loading-method.patch
Patch0125: 0125-Honor-a-symlink-when-generating-configuration-by-gru.patch
Patch0126: 0126-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch
BuildRequires: flex bison binutils python
BuildRequires: ncurses-devel xz-devel bzip2-devel
@ -613,6 +614,10 @@ fi
%{_datarootdir}/grub/themes/
%changelog
* Mon Jun 30 2014 Peter Jones <pjones@redhat.com> - 2.02-0.5
- Avoid munging raw spaces when we're escaping command line arguments.
Resolves: rhbz#923374
* Tue Jun 24 2014 Peter Jones <pjones@redhat.com> - 2.02-0.4
- Update to latest upstream.