summaryrefslogtreecommitdiff
path: root/src/boot/efi/stub.c
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2018-09-03 13:57:54 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-03 14:10:38 +0200
commit15720d03400f3e0a3b87f0fd7f54ac9f657c7a41 (patch)
tree854be8ce928899c5e3646d291d55b83f5bb2e143 /src/boot/efi/stub.c
parent81375d802672f34205bef9f301c58854af5fc568 (diff)
downloadsystemd-15720d03400f3e0a3b87f0fd7f54ac9f657c7a41.tar.gz
boot/efi/stub.c: fix Dell LoadOptions
On Dell machines LoadOptions is filled with: 01 00 00 00 <name of BIOS Boot Loader Entry> ... <unknown bytes> So, in case of meaningfull LoadOptions, better check if the first char is a printable character.
Diffstat (limited to 'src/boot/efi/stub.c')
-rw-r--r--src/boot/efi/stub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
index 15cdfca2a3..5c97b54691 100644
--- a/src/boot/efi/stub.c
+++ b/src/boot/efi/stub.c
@@ -68,7 +68,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
cmdline_len = szs[0];
/* if we are not in secure boot mode, accept a custom command line and replace the built-in one */
- if (!secure && loaded_image->LoadOptionsSize > 0 && *(CHAR16 *)loaded_image->LoadOptions != 0) {
+ if (!secure && loaded_image->LoadOptionsSize > 0 && *(CHAR16 *)loaded_image->LoadOptions > 0x1F) {
CHAR16 *options;
CHAR8 *line;
UINTN i;