mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-12 19:25:06 +00:00
tpm2: Initialize eccPublic before passing to TPMS_ECC_POINT_Unmarshal (Coverity)
Resolve the following Coverity complaint: "Using uninitialized value eccPublic when calling TPMS_ECC_POINT_Unmarshal." Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
caf9b95f8c
commit
444599e77a
@ -639,6 +639,9 @@ CryptSecretDecrypt(
|
||||
TPMS_ECC_POINT eccSecret;
|
||||
BYTE *buffer = secret->t.secret;
|
||||
INT32 size = secret->t.size;
|
||||
|
||||
MemorySet(&eccPublic, 0, sizeof(eccPublic)); // libtpms added: Coverity
|
||||
|
||||
// Retrieve ECC point from secret buffer
|
||||
result = TPMS_ECC_POINT_Unmarshal(&eccPublic, &buffer, &size);
|
||||
if(result == TPM_RC_SUCCESS)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user