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

18 Feb
2018
18 Feb
'18
12:08 a.m.
Check that parameter guid is not NULL. This avoids a possible NULL pointer exception.
Signed-off-by: Heinrich Schuchardt xypron.glpk@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
2638
Age (days ago)
2638
Last active (days ago)
0 comments
1 participants
participants (1)
-
Heinrich Schuchardt