From b27d8e4037a710e0246ce52cb785e6a0a877f92c Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 2 Apr 2022 11:47:00 +0200 Subject: [PATCH] efi_loader: EFI_HII_STRING_PROTOCOL.GetString() Use u16_strsize(). Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_hii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c index 9f87e95e32..75ff58aafa 100644 --- a/lib/efi_loader/efi_hii.c +++ b/lib/efi_loader/efi_hii.c @@ -900,7 +900,7 @@ get_string(const struct efi_hii_string_protocol *this, str = stbl->strings[string_id - 1].string; if (str) { - len = (u16_strlen(str) + 1) * sizeof(u16); + len = u16_strsize(str); if (*string_size < len) { *string_size = len; -- 2.39.5