projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db80fe3
)
efi_loader: GetNextMonotonicCount() check parameter
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Fri, 17 May 2019 10:47:17 +0000
(12:47 +0200)
committer
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Sun, 19 May 2019 06:10:10 +0000
(08:10 +0200)
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>
lib/efi_loader/efi_boottime.c
patch
|
blob
|
history
diff --git
a/lib/efi_loader/efi_boottime.c
b/lib/efi_loader/efi_boottime.c
index ce6ca06f75b4842d2b3a548601d112bf9e52321b..971bd5ffa3e96f19beef17e2bb758dadfb197250 100644
(file)
--- a/
lib/efi_loader/efi_boottime.c
+++ b/
lib/efi_loader/efi_boottime.c
@@
-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 uint64_t mono;
+ efi_status_t ret;
EFI_ENTRY("%p", count);
+ if (!count) {
+ ret = EFI_INVALID_PARAMETER;
+ goto out;
+ }
*count = mono++;
- return EFI_EXIT(EFI_SUCCESS);
+ ret = EFI_SUCCESS;
+out:
+ return EFI_EXIT(ret);
}
/**