You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
876 B
29 lines
876 B
8 months ago
|
From 3a31a48e1bda8d8799695a878a872fd30d5c3e45 Mon Sep 17 00:00:00 2001
|
||
|
From: Luca Boccassi <bluca@debian.org>
|
||
|
Date: Fri, 12 May 2023 00:49:57 +0100
|
||
|
Subject: [PATCH] efi: support passing empty cmdline to mangle_stub_cmdline()
|
||
|
|
||
|
Just return instead of crashing
|
||
|
|
||
|
(cherry picked from commit e715d82de6694d82a17921b5ccbcf47398604068)
|
||
|
|
||
|
Related: RHEL-16952
|
||
|
---
|
||
|
src/boot/efi/util.c | 3 +++
|
||
|
1 file changed, 3 insertions(+)
|
||
|
|
||
|
diff --git a/src/boot/efi/util.c b/src/boot/efi/util.c
|
||
|
index bd821a5afb..b8befb4b0c 100644
|
||
|
--- a/src/boot/efi/util.c
|
||
|
+++ b/src/boot/efi/util.c
|
||
|
@@ -272,6 +272,9 @@ char16_t *xstr8_to_path(const char *str8) {
|
||
|
}
|
||
|
|
||
|
void mangle_stub_cmdline(char16_t *cmdline) {
|
||
|
+ if (!cmdline)
|
||
|
+ return;
|
||
|
+
|
||
|
for (; *cmdline != '\0'; cmdline++)
|
||
|
/* Convert ASCII control characters to spaces. */
|
||
|
if (*cmdline <= 0x1F)
|