Skip to content

Commit 150b0f8

Browse files
author
Thomas Hinds
committed
Fix handling of multiple XDR certs in MfciDxe when the cert buffer address is not aligned itself
Fixes an issue where XDR certificates may not be correctly parsed in MfciDxe - ValidateBlobWithXdrCertificates when the buffer containing the certs is not aligned to a 4-byte boundary, even if the certs are aligned within the buffer itself. The alignment should be taked with respect to the start of the buffer, rather than the absolute position in memory.
1 parent f84d42d commit 150b0f8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

MfciPkg/MfciDxe/MfciDxe.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,7 @@ ValidateBlobWithXdrCertificates (
667667
break;
668668
}
669669

670-
PublicKeyDataCurrent = PublicKeyData + PublicKeyDataLength;
671-
PublicKeyDataCurrent = (UINT8 *)ALIGN_POINTER (PublicKeyDataCurrent, sizeof (UINT32));
670+
PublicKeyDataCurrent = PublicKeyData + ALIGN_VALUE (PublicKeyDataLength, sizeof (UINT32));
672671
}
673672

674673
// above is inspired/borrowed from FmpDxe.c

0 commit comments

Comments
 (0)