Skip to content

Commit e2d1c34

Browse files
committed
F-3507 - https://fenrir.wolfssl.com/finding/3507 - examples/attestation/activate_credential: zero-init tpmSession so early-failure cleanup is safe
1 parent f66ca1e commit e2d1c34

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

examples/attestation/activate_credential.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ int TPM2_ActivateCredential_Example(void* userCtx, int argc, char *argv[])
9999
XMEMSET(&endorse, 0, sizeof(endorse));
100100
XMEMSET(&storage, 0, sizeof(storage));
101101
XMEMSET(&akKey, 0, sizeof(akKey));
102+
XMEMSET(&tpmSession, 0, sizeof(tpmSession));
102103

103104
printf("Demo how to create a credential blob for remote attestation\n");
104105
rc = wolfTPM2_Init(&dev, TPM2_IoCb, userCtx);

0 commit comments

Comments
 (0)