lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 34343eb0 authored by Ard Biesheuvel's avatar Ard Biesheuvel

efi/libstub: smbios: Use length member instead of record struct size

The type 1 SMBIOS record happens to always be the same size, but there
are other record types which have been augmented over time, and so we
should really use the length field in the header to decide where the
string table starts.

Fixes: 550b33cf ("arm64: efi: Force the use of ...")
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent 8b3a149d
......@@ -36,7 +36,7 @@ const u8 *__efi_get_smbios_string(u8 type, int offset, int recsize)
if (status != EFI_SUCCESS)
return NULL;
strtable = (u8 *)record + recsize;
strtable = (u8 *)record + record->length;
for (int i = 1; i < ((u8 *)record)[offset]; i++) {
int len = strlen(strtable);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment