diff options
| author | Vincent Stehlé <[email protected]> | 2026-05-12 19:40:33 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2026-05-18 08:38:16 +0200 |
| commit | ec95a60d9dcd9436faa08f8151f05e4bba8e14a0 (patch) | |
| tree | 1a9f59396b2f2ca7fffde9b210c33fd5ee4a2720 | |
| parent | e49c84f7bb7b69a9736e8243665b30b46075ab55 (diff) | |
efi_loader: fix hii keyboard layout pointer computation
The EFI_HII_KEYBOARD_LAYOUT field `layout_length' is expressed in bytes,
but we add it to the `layout' pointer with (scaled) pointer arithmetic.
When adding an HII keyboard package with multiple keyboard layouts, this
results in only the first layout being added correctly; fix it.
Fixes: 8d3b77e36e10 ("efi: hii: add keyboard layout package support")
Signed-off-by: Vincent Stehlé <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: AKASHI Takahiro <[email protected]>
| -rw-r--r-- | lib/efi_loader/efi_hii.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c index 330d7c5830b..7bf51ad43d1 100644 --- a/lib/efi_loader/efi_hii.c +++ b/lib/efi_loader/efi_hii.c @@ -324,7 +324,8 @@ add_keyboard_package(struct efi_hii_packagelist *hii, list_add_tail(&layout_data->link_sys, &efi_keyboard_layout_list); - layout += layout_length; + layout = (struct efi_hii_keyboard_layout *) + ((uintptr_t)layout + layout_length); } list_add_tail(&package_data->link, &hii->keyboard_packages); |
