X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=SecurityPkg%2FLibrary%2FTpm12CommandLib%2FTpm12GetCapability.c;h=29d7a13edb159fe8deecce0253648f09985feead;hp=c6eb9e1050d446258a2ed98103e022fa5f0c29ae;hb=28892d768be4ad731d754fb13de58368d524fd14;hpb=dd577319e83d13a7ab46ffdccb6635281d2ca9e5 diff --git a/SecurityPkg/Library/Tpm12CommandLib/Tpm12GetCapability.c b/SecurityPkg/Library/Tpm12CommandLib/Tpm12GetCapability.c index c6eb9e1050..29d7a13edb 100644 --- a/SecurityPkg/Library/Tpm12CommandLib/Tpm12GetCapability.c +++ b/SecurityPkg/Library/Tpm12CommandLib/Tpm12GetCapability.c @@ -1,7 +1,7 @@ /** @file Implement TPM1.2 Get Capabilities related commands. -Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -85,7 +85,7 @@ Tpm12GetCapabilityFlagPermanent ( } ZeroMem (TpmPermanentFlags, sizeof (*TpmPermanentFlags)); - CopyMem (TpmPermanentFlags, &Response.Flags, MIN (sizeof (*TpmPermanentFlags), Response.ResponseSize)); + CopyMem (TpmPermanentFlags, &Response.Flags, MIN (sizeof (*TpmPermanentFlags), SwapBytes32(Response.ResponseSize))); return Status; } @@ -131,7 +131,7 @@ Tpm12GetCapabilityFlagVolatile ( } ZeroMem (VolatileFlags, sizeof (*VolatileFlags)); - CopyMem (VolatileFlags, &Response.Flags, MIN (sizeof (*VolatileFlags), Response.ResponseSize)); + CopyMem (VolatileFlags, &Response.Flags, MIN (sizeof (*VolatileFlags), SwapBytes32(Response.ResponseSize))); return Status; }