From e3eedb0be581b7f3df70e8150c7adfcf275506b8 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 8 Dec 2020 15:52:25 +0000 Subject: [PATCH] [efi] Avoid using potentially uninitialised driver name in veto checks Signed-off-by: Michael Brown --- src/interface/efi/efi_veto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/interface/efi/efi_veto.c b/src/interface/efi/efi_veto.c index ad501f262..6ff7898e9 100644 --- a/src/interface/efi/efi_veto.c +++ b/src/interface/efi/efi_veto.c @@ -518,8 +518,10 @@ static int efi_veto_find ( EFI_HANDLE driver, const char *manufacturer, /* Get driver name, if available */ if ( wtf.wtf && ( ( efirc = wtf.wtf->GetDriverName ( wtf.wtf, "eng", - &name ) != 0 ) ) ) { - /* Ignore failure; is not required to be present */ + &name ) == 0 ) ) ) { + /* Driver has a name */ + } else { + /* Ignore failure; name is not required to be present */ name = NULL; }