Fix an issue in firmware update

This patch fixed an issue in firmware update. During the saved capsule
signature verification against the capsule signature to make sure
that the capsule did not change during the reboot, instead of using
length of the signature, used the size of the macro that indicate the
length of the signature.

Verified that firmware update is able to pass on WHL.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
This commit is contained in:
Raghava Gudla
2020-08-13 15:07:05 -07:00
committed by Maurice Ma
parent 0000d110a2
commit 4bee65a8f6
+1 -1
View File
@@ -623,7 +623,7 @@ AuthenticateCapsule (
//
if (*(UINT32 *)(FwUpdStatus.CapsuleSig) != 0xFFFFFFFF) {
CopyMem((VOID *)&FwUpdStatus.CapsuleSig, (VOID *)SignatureHdr, sizeof(FW_UPDATE_SIG_LENGTH));
CopyMem((VOID *)&FwUpdStatus.CapsuleSig, (VOID *)SignatureHdr, FW_UPDATE_SIG_LENGTH);
Status = BootMediaWrite (FwUpdStatusOffset, sizeof(FW_UPDATE_STATUS), (UINT8 *)&FwUpdStatus);
if (EFI_ERROR (Status)) {