[U-Boot] [PATCH 1/1][for v2018.03] efi_loader: check parameter in InstallConfigurationTable

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Feb 17 23:08:00 UTC 2018


Check that parameter guid is not NULL. This avoids a possible NULL
pointer exception.

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

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 6eea2395c7..c0396578fb 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1331,6 +1331,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)) {
-- 
2.14.2



More information about the U-Boot mailing list