aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2020-12-08 15:52:25 +0000
committerMichael Brown <mcb30@ipxe.org>2020-12-08 15:52:25 +0000
commite3eedb0be581b7f3df70e8150c7adfcf275506b8 (patch)
treeb793cf4f8f8aa4ecef263ab1dc508b6f36727689
parent39f5293492f351a274940d0ba2624ecb242b3c9b (diff)
downloadipxe-e3eedb0be581b7f3df70e8150c7adfcf275506b8.zip
ipxe-e3eedb0be581b7f3df70e8150c7adfcf275506b8.tar.gz
ipxe-e3eedb0be581b7f3df70e8150c7adfcf275506b8.tar.bz2
[efi] Avoid using potentially uninitialised driver name in veto checks
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/interface/efi/efi_veto.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interface/efi/efi_veto.c b/src/interface/efi/efi_veto.c
index ad501f2..6ff7898 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;
}