1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-29 04:55:36 +03:00

efi: support passing empty cmdline to mangle_stub_cmdline()

Just return instead of crashing
This commit is contained in:
Luca Boccassi 2023-05-12 00:49:57 +01:00
parent 3e8cb05e12
commit e715d82de6

View File

@ -268,6 +268,9 @@ char16_t *xstr8_to_path(const char *str8) {
void mangle_stub_cmdline(char16_t *cmdline) {
char16_t *p = cmdline;
if (!cmdline)
return;
for (; *cmdline != '\0'; cmdline++)
/* Convert ASCII control characters to spaces. */
if (*cmdline <= 0x1F)