From: Heinrich Schuchardt Date: Sat, 2 Apr 2022 09:47:00 +0000 (+0200) Subject: efi_loader: EFI_HII_STRING_PROTOCOL.GetString() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=b27d8e4037a710e0246ce52cb785e6a0a877f92c;p=u-boot.git efi_loader: EFI_HII_STRING_PROTOCOL.GetString() Use u16_strsize(). Signed-off-by: Heinrich Schuchardt --- 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;