diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-05-18 18:11:54 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-05-19 08:10:10 +0200 |
commit | b31ca6bf8484ca10bab4ae544698294a4197bef9 (patch) | |
tree | a19bce77460c5dd369a3c3ac65d7b64014f4f2d4 | |
parent | acee965263e8d04d07f9b36d54a4bc8bde30727c (diff) | |
download | u-boot-b31ca6bf8484ca10bab4ae544698294a4197bef9.tar.gz |
efi_loader: parameter check OutputString
Check the parameters against NULL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r-- | lib/efi_loader/efi_console.c | 5 |
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; |