X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=SecurityPkg%2FLibrary%2FTpm12CommandLib%2FTpm12Pcr.c;fp=SecurityPkg%2FLibrary%2FTpm12CommandLib%2FTpm12Pcr.c;h=18d5b96e6fb62f566c1c7abb81a79ef3f962ddc3;hb=950a3bc788b5b101729b26aed3ff75fd2a64a570;hp=321653fb60bac368f20404d40115968e5c417451;hpb=6c59c7c2f488d7c9b951b5ead780f6102dafae8a;p=mirror_edk2.git diff --git a/SecurityPkg/Library/Tpm12CommandLib/Tpm12Pcr.c b/SecurityPkg/Library/Tpm12CommandLib/Tpm12Pcr.c index 321653fb60..18d5b96e6f 100644 --- a/SecurityPkg/Library/Tpm12CommandLib/Tpm12Pcr.c +++ b/SecurityPkg/Library/Tpm12CommandLib/Tpm12Pcr.c @@ -74,6 +74,11 @@ Tpm12Extend ( return Status; } + if (SwapBytes32(Response.Hdr.returnCode) != TPM_SUCCESS) { + DEBUG ((EFI_D_ERROR, "Tpm12Extend: Response Code error! 0x%08x\r\n", SwapBytes32(Response.Hdr.returnCode))); + return EFI_DEVICE_ERROR; + } + if (NewPcrValue != NULL) { CopyMem (NewPcrValue, &Response.TpmDigest, sizeof (*NewPcrValue)); }