mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-29 14:41:26 +01:00
efi_loader: GetNextMonotonicCount() check parameter
Do not write to address indicated by NULL pointer. UEFI SCT II 2.6 (2017), 3.6.5 GetNextMonotonicCount(), 5.1.5.5.1 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
db80fe3866
commit
1344f7d0f6
@ -1916,10 +1916,17 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle,
|
|||||||
static efi_status_t EFIAPI efi_get_next_monotonic_count(uint64_t *count)
|
static efi_status_t EFIAPI efi_get_next_monotonic_count(uint64_t *count)
|
||||||
{
|
{
|
||||||
static uint64_t mono;
|
static uint64_t mono;
|
||||||
|
efi_status_t ret;
|
||||||
|
|
||||||
EFI_ENTRY("%p", count);
|
EFI_ENTRY("%p", count);
|
||||||
|
if (!count) {
|
||||||
|
ret = EFI_INVALID_PARAMETER;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
*count = mono++;
|
*count = mono++;
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
ret = EFI_SUCCESS;
|
||||||
|
out:
|
||||||
|
return EFI_EXIT(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user