diff options
| author | Ilias Apalodimas <[email protected]> | 2022-11-10 15:31:30 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2022-11-16 08:34:06 +0100 |
| commit | 94a574d8f6116a12def77fbf9a92f02a430a1d12 (patch) | |
| tree | fe83aea3c0d080db08e21d695a8cf1e9a76e6477 /lib | |
| parent | 1167e88ab876febdc1c567e877a6d81996a566a1 (diff) | |
efi_loader: add comments on efi_file_from_path() regarding alignment
UEFI specification requires pointers that are passed to protocol member
functions to be aligned. There's a u16_strdup in that function which
doesn't make sense otherwise Add a comment so no one removes it
accidentally
Signed-off-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/efi_loader/efi_file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c index 8b9fa5885ae..b1495e58ee0 100644 --- a/lib/efi_loader/efi_file.c +++ b/lib/efi_loader/efi_file.c @@ -1144,6 +1144,11 @@ struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp) return NULL; } + /* + * UEFI specification requires pointers that are passed to + * protocol member functions to be aligned. So memcpy it + * unconditionally + */ filename = u16_strdup(fdp->str); if (!filename) return NULL; |
