diff options
author | Tom Rini <trini@konsulko.com> | 2020-07-13 11:29:51 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-13 11:29:51 -0400 |
commit | 959a481f8f49cb01d757363ae816d83e9c145ab7 (patch) | |
tree | 2536cd6e870df4b797e8da6278d2447abf106197 /lib/efi_loader/efi_boottime.c | |
parent | 497c7598c4e713eb9ad88fd7963e57b21b8b35e1 (diff) | |
parent | 4a3155de3dbadfcb933287dbb84c8eff0fd951eb (diff) |
Merge tag 'efi-2020-10-rc1-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-10-rc1 (3)
Up to now UEFI variables where stored in U-Boot environment variables.
Saving UEFI variables was not possible without saving the U-Boot
environment variables. With this patch series file ubootefi.var in the
EFI system partition is used for saving UEFI variables. Furthermore the
UEFI variables are exposed for reading at runtime.
Code corrections for UEFI secure boot are provided.
A buffer overrun in the RSA library is fixed.
Diffstat (limited to 'lib/efi_loader/efi_boottime.c')
-rw-r--r-- | lib/efi_loader/efi_boottime.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 1591ad8300..0b16554ba2 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -3459,6 +3459,8 @@ static efi_status_t efi_get_child_controllers( * the buffer will be too large. But that does not harm. */ *number_of_children = 0; + if (!count) + return EFI_SUCCESS; *child_handle_buffer = calloc(count, sizeof(efi_handle_t)); if (!*child_handle_buffer) return EFI_OUT_OF_RESOURCES; @@ -3536,10 +3538,12 @@ static efi_status_t EFIAPI efi_disconnect_controller( number_of_children = 1; child_handle_buffer = &child_handle; } else { - efi_get_child_controllers(efiobj, - driver_image_handle, - &number_of_children, - &child_handle_buffer); + r = efi_get_child_controllers(efiobj, + driver_image_handle, + &number_of_children, + &child_handle_buffer); + if (r != EFI_SUCCESS) + return r; } /* Get the driver binding protocol */ |