summaryrefslogtreecommitdiffstats
path: root/lib/efi_loader/efi_console.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-05-18 18:11:54 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-05-19 08:10:10 +0200
commitb31ca6bf8484ca10bab4ae544698294a4197bef9 (patch)
treea19bce77460c5dd369a3c3ac65d7b64014f4f2d4 /lib/efi_loader/efi_console.c
parentacee965263e8d04d07f9b36d54a4bc8bde30727c (diff)
downloadu-boot-b31ca6bf8484ca10bab4ae544698294a4197bef9.tar.gz
u-boot-b31ca6bf8484ca10bab4ae544698294a4197bef9.tar.xz
u-boot-b31ca6bf8484ca10bab4ae544698294a4197bef9.zip
efi_loader: parameter check OutputString
Check the parameters against NULL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader/efi_console.c')
-rw-r--r--lib/efi_loader/efi_console.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index 909fd5c29e..b2cb18e6d6 100644
--- 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;