All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] efi_loader: parameter check OutputString
@ 2019-05-18 16:26 Heinrich Schuchardt
  0 siblings, 0 replies; only message in thread
From: Heinrich Schuchardt @ 2019-05-18 16:26 UTC (permalink / raw)
  To: u-boot

Check the parameters against NULL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 lib/efi_loader/efi_console.c | 5 +++++
 1 file changed, 5 insertions(+)

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;
--
2.20.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-18 16:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-18 16:26 [U-Boot] [PATCH] efi_loader: parameter check OutputString Heinrich Schuchardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.