On 17.08.21 14:57, Christian Storm wrote: > 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); >
Thanks, both applied. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux -- 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/10046792-105d-3c56-4a1e-93926b53688c%40siemens.com.
