From: Jan Kiszka <[email protected]>

The kernel stub does no support options passed on load and will always
use the built-in ones or none if they are empty. Warn when someone tries
to pass some nevertheless to avoid surprises.

Suggested-by: Christian Storm <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
---
 kernel-stub/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel-stub/main.c b/kernel-stub/main.c
index 36249b4..95a9593 100644
--- a/kernel-stub/main.c
+++ b/kernel-stub/main.c
@@ -111,6 +111,11 @@ EFI_STATUS efi_main(EFI_HANDLE image_handle, 
EFI_SYSTEM_TABLE *system_table)
                error_exit(L"Error getting LoadedImageProtocol", status);
        }
 
+       /* consider zero-termination for string length */
+       if (stub_image->LoadOptionsSize > sizeof(CHAR16)) {
+               info(L"WARNING: Passed command line options ignored, only 
built-in used");
+       }
+
        pe_header = get_pe_header(stub_image->ImageBase);
        for (n = 0, section = get_sections(pe_header);
             n < pe_header->Coff.NumberOfSections;
-- 
2.34.1

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/ccbcf716-7deb-59c3-327b-106c65e629c1%40siemens.com.

Reply via email to