projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84a918e
)
efi_loader: LoadImage() check source size
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Sun, 5 May 2019 14:55:06 +0000
(16:55 +0200)
committer
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Tue, 7 May 2019 19:10:04 +0000
(21:10 +0200)
If the size of the source buffer is 0, return EFI_LOAD_ERROR.
(UEFI SCT II 2017: 3.4.1 LoadImage() - 5.1.4.1.6)
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
ef9e378
..
89966a2
100644
(file)
--- a/
lib/efi_loader/efi_boottime.c
+++ b/
lib/efi_loader/efi_boottime.c
@@
-1781,6
+1781,10
@@
efi_status_t EFIAPI efi_load_image(bool boot_policy,
if (ret != EFI_SUCCESS)
goto error;
} else {
+ if (!source_size) {
+ ret = EFI_LOAD_ERROR;
+ goto error;
+ }
dest_buffer = source_buffer;
}
/* split file_path which contains both the device and file parts */