[Bug 3518] New: TestPointCheckTcgTrustedBoot() forgets to initialize the size of


bugzilla-daemon@...
 

https://bugzilla.tianocore.org/show_bug.cgi?id=3518

Bug ID: 3518
Summary: TestPointCheckTcgTrustedBoot() forgets to initialize
the size of
Product: EDK2 Platforms
Version: Current
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Lowest
Component: MinPlatformPkg
Assignee: unassigned@tianocore.org
Reporter: jerecox@microsoft.com
CC: edk2+bugs+int+994+563148131503455288@groups.io

The size member of EFI_TCG2_BOOT_SERVICE_CAPABILITY ProtocolCapability should
be initialized prior to calling Tcg2->GetCapability(), else it might return
EFI_BUFFER_TOO_SMALL because it does not know which version of the structure is
in use.


--- a/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckTcgTrustedBoot.c
+++ b/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckTcgTrustedBoot.c
@@ -41,6 +41,7 @@ TestPointCheckTcgTrustedBoot (
goto Done;
}

+ ProtocolCapability.Size = (UINT8) sizeof (ProtocolCapability);
Status = Tcg2->GetCapability (Tcg2, &ProtocolCapability);
if (EFI_ERROR(Status)) {
DEBUG ((DEBUG_ERROR, "Tcg2->GetCapability - %r\n", Status));

--
You are receiving this mail because:
You are on the CC list for the bug.