From eb68b4ef31cd7d0fe08becda7ac1e56b45f9054a Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 18 Feb 2018 00:08:00 +0100 Subject: efi_loader: check parameter in InstallConfigurationTable Check that parameter guid is not NULL. This avoids a possible NULL pointer exception. Signed-off-by: Heinrich Schuchardt Signed-off-by: Alexander Graf --- lib/efi_loader/efi_boottime.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/efi_loader') diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 3cee8d607c..9ca2e8161e 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1333,6 +1333,9 @@ efi_status_t efi_install_configuration_table(const efi_guid_t *guid, void *table { int i; + if (!guid) + return EFI_INVALID_PARAMETER; + /* Check for guid override */ for (i = 0; i < systab.nr_tables; i++) { if (!guidcmp(guid, &efi_conf_table[i].guid)) { -- cgit