]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Avoid using potentially uninitialised driver name in veto checks
authorMichael Brown <mcb30@ipxe.org>
Tue, 8 Dec 2020 15:52:25 +0000 (15:52 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 8 Dec 2020 15:52:25 +0000 (15:52 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_veto.c

index ad501f26262fe2be3e0b0c1746ed55fee4cc6e97..6ff7898e92473dffecfc009ab5fa5feb97cb0e13 100644 (file)
@@ -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;
        }