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:
parent
3e8cb05e12
commit
e715d82de6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user