From: Christian Storm <[email protected]> If volumes[i].root == NULL, an error is printed, the return code is updated, but there's no bailout/continue, hence the following Close() call attempt dereferences a NULL pointer. Avoid this by continue'ing the loop instead.
Signed-off-by: Christian Storm <[email protected]> --- utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.c b/utils.c index 3929cb0..8088372 100644 --- a/utils.c +++ b/utils.c @@ -196,6 +196,7 @@ EFI_STATUS close_volumes(VOLUME_DESC *volumes, UINTN count) if (!volumes[i].root) { ERROR(L"Invalid handle for volume %d.\n", i); result = EFI_INVALID_PARAMETER; + continue; } status = uefi_call_wrapper(volumes[i].root->Close, 1, volumes[i].root); -- 2.32.0 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/20210817125747.49713-2-christian.storm%40siemens.com.
