]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: EFI_HII_STRING_PROTOCOL.GetString()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 2 Apr 2022 09:47:00 +0000 (11:47 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 15 Apr 2022 09:26:21 +0000 (11:26 +0200)
Use u16_strsize().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_hii.c

index 9f87e95e32d2054226cf0a1b026f1767269f9f95..75ff58aafa54c0c7e8caf2d051e51c039870c118 100644 (file)
@@ -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;