From: Michael Brown Date: Tue, 8 Dec 2020 15:52:25 +0000 (+0000) Subject: [efi] Avoid using potentially uninitialised driver name in veto checks X-Git-Tag: v1.21.1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3eedb0be581b7f3df70e8150c7adfcf275506b8;p=thirdparty%2Fipxe.git [efi] Avoid using potentially uninitialised driver name in veto checks Signed-off-by: Michael Brown --- 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; }