aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-03-24 17:52:40 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-07-11 23:14:17 +0200
commit724d28171e5bd239866cdf885a7b70c059ddd563 (patch)
tree87deda5dc86262927ae9bdb694f514bc20fa9151 /lib/efi_loader
parenta44d2a23992ba70dfeefbad9c55249bfc6be9fbc (diff)
downloadu-boot-724d28171e5bd239866cdf885a7b70c059ddd563.zip
u-boot-724d28171e5bd239866cdf885a7b70c059ddd563.tar.gz
u-boot-724d28171e5bd239866cdf885a7b70c059ddd563.tar.bz2
efi_loader: optional pointer for ConvertPointer
If the EFI_OPTIONAL_PTR is set in DebugDisposition, a NULL pointer does not constitute an invalid parameter. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r--lib/efi_loader/efi_runtime.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 45baa2f..a4aa1d8 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -512,6 +512,12 @@ efi_convert_pointer(efi_uintn_t debug_disposition, void **address)
ret = EFI_INVALID_PARAMETER;
goto out;
}
+ if (!*address) {
+ if (debug_disposition & EFI_OPTIONAL_PTR)
+ return EFI_SUCCESS;
+ else
+ return EFI_INVALID_PARAMETER;
+ }
addr = (uintptr_t)*address;
for (i = 0; i < efi_descriptor_count; i++) {