efi/libstub: smbios: Use length member instead of record struct size
authorArd Biesheuvel <ardb@kernel.org>
Tue, 28 Feb 2023 18:23:09 +0000 (19:23 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Sat, 18 Mar 2023 10:37:56 +0000 (11:37 +0100)
commit34343eb06afc04af9178a9883d9354dc12beede0
tree6e53401fc61d24099546c7b9ec9fd8b3ddc29546
parent8b3a149db461d3286d1e211112de3b44ccaeaf71
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: 550b33cfd4452968 ("arm64: efi: Force the use of ...")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/smbios.c