From: Heinrich Schuchardt Date: Sat, 17 Feb 2018 23:08:00 +0000 (+0100) Subject: efi_loader: check parameter in InstallConfigurationTable X-Git-Tag: v2018.05-rc2~45^2~42 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=eb68b4ef31cd7d0fe08becda7ac1e56b45f9054a;p=u-boot 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 --- 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)) {