Browse files

Fix signature checking

We could potentially find a valid signature and then fail to validate it
due to not breaking out of the outer while loop.
  • Loading branch information...
1 parent 53feaa0 commit 7a471602081dca1c825e66e4621e8c1ac9d01fd5 Matthew Garrett committed Nov 1, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 shim.c
View
3 shim.c
@@ -237,6 +237,9 @@ static CHECK_STATUS check_db_cert_in_ram(EFI_SIGNATURE_LIST *CertList,
Cert = (EFI_SIGNATURE_DATA *) ((UINT8 *) Cert + CertList->SignatureSize);
}
+ if (IsFound)
+ break;
+
dbsize -= CertList->SignatureListSize;
CertList = (EFI_SIGNATURE_LIST *) ((UINT8 *) CertList + CertList->SignatureListSize);
}

0 comments on commit 7a47160

Please sign in to comment.