From 828e3790a4a6e9bc8802f62a292abab23e3765ab Mon Sep 17 00:00:00 2001 From: mintsuki Date: Wed, 8 Mar 2023 15:40:11 +0100 Subject: [PATCH] chainload: LoadOptionsSize should be in bytes. Fixes #254 --- common/protos/chainload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/protos/chainload.c b/common/protos/chainload.c index c5c70eef..aa47ef99 100644 --- a/common/protos/chainload.c +++ b/common/protos/chainload.c @@ -292,7 +292,7 @@ noreturn void efi_chainload_file(char *config, char *cmdline, struct file_handle new_handle_loaded_image->DeviceHandle = efi_part_handle; } - new_handle_loaded_image->LoadOptionsSize = cmdline_len; + new_handle_loaded_image->LoadOptionsSize = cmdline_len * sizeof(CHAR16); new_handle_loaded_image->LoadOptions = new_cmdline; UINTN exit_data_size = 0;