[PATCH 3/4] efi_loader: EFI_HII_STRING_PROTOCOL.GetString()
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Sat Apr 2 11:47:00 CEST 2022
Use u16_strsize().
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
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.34.1
More information about the U-Boot
mailing list