From: Heinrich Schuchardt Date: Sat, 18 May 2019 16:11:54 +0000 (+0200) Subject: efi_loader: parameter check OutputString X-Git-Tag: v2019.07-rc3~20^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b31ca6bf8484ca10bab4ae544698294a4197bef9;p=platform%2Fkernel%2Fu-boot.git efi_loader: parameter check OutputString Check the parameters against NULL. Signed-off-by: Heinrich Schuchardt --- diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 909fd5c..b2cb18e 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;