diff options
author | zodf0055980 <zodf0055980@gmail.com> | 2024-08-21 15:18:08 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-31 16:43:28 +0000 |
commit | f7abf6af2db7a823aa139fbbf8a82d209aca4998 (patch) | |
tree | d8cbc99f2bc10457b04af3066cea6aae44420b53 /SecurityPkg/Library | |
parent | 96b90e150c2f107c64a827e82451b642a42df686 (diff) | |
download | edk2-f7abf6af2db7a823aa139fbbf8a82d209aca4998.tar.gz edk2-f7abf6af2db7a823aa139fbbf8a82d209aca4998.tar.bz2 edk2-f7abf6af2db7a823aa139fbbf8a82d209aca4998.zip |
SecurityPkg: Fix exponent unmarshaled as 16 bits
According issue #5536, exponent is 32 bits but is unmarshaled as 16 bits.
Signed-off-by: zodf0055980 <zodf0055980@gmail.com>
Diffstat (limited to 'SecurityPkg/Library')
-rw-r--r-- | SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c index 335957d6ce..888979e969 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c @@ -252,7 +252,7 @@ Tpm2ReadPublic ( OutPublic->publicArea.parameters.rsaDetail.keyBits = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer));
Buffer += sizeof (UINT16);
- OutPublic->publicArea.parameters.rsaDetail.exponent = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer));
+ OutPublic->publicArea.parameters.rsaDetail.exponent = SwapBytes32 (ReadUnaligned32 ((UINT32 *)Buffer));
Buffer += sizeof (UINT32);
break;
case TPM_ALG_ECC:
|