projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acee965
)
efi_loader: parameter check OutputString
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Sat, 18 May 2019 16:11:54 +0000
(18:11 +0200)
committer
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Sun, 19 May 2019 06:10:10 +0000
(08:10 +0200)
Check the parameters against NULL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_console.c
patch
|
blob
|
history
diff --git
a/lib/efi_loader/efi_console.c
b/lib/efi_loader/efi_console.c
index 909fd5c29ef9021daecc6c4e8c29cd77a1f22a70..b2cb18e6d67021c194dff39914c5b401a6e1967d 100644
(file)
--- a/
lib/efi_loader/efi_console.c
+++ b/
lib/efi_loader/efi_console.c
@@
-136,6
+136,11
@@
static efi_status_t EFIAPI efi_cout_output_string(
EFI_ENTRY("%p, %p", this, string);
+ if (!this || !string) {
+ ret = EFI_INVALID_PARAMETER;
+ goto out;
+ }
+
buf = malloc(utf16_utf8_strlen(string) + 1);
if (!buf) {
ret = EFI_OUT_OF_RESOURCES;