mirror of
https://github.com/stefanberger/libtpms
synced 2025-12-31 02:55:54 +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
24d38994b4
commit
9cd9fcf7ac
@ -781,6 +781,8 @@ CryptSecretDecrypt(OBJECT* decryptKey, // IN: decrypt key
|
||||
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