grub2/0044-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch
Petr Šabata 100e37f2e6 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/grub2#f7e054f3d693af43a903faf33b70673f7aca4508
2020-10-15 09:48:35 +02:00

34 lines
960 B
Diff

From 0000000000000000000000000000000000000000 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] 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 e0fb0a9e48a..8e2294d8ff6 100644
--- a/grub-core/lib/cmdline.c
+++ b/grub-core/lib/cmdline.c
@@ -98,16 +98,7 @@ 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++;