Skip to content

Commit c2a0b9f

Browse files
committed
Fix finding 350
1 parent 6a3d0bb commit c2a0b9f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/tpm2_wrap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3507,10 +3507,13 @@ int wolfTPM2_ImportPrivateKeyBuffer(WOLFTPM2_DEV* dev,
35073507

35083508
#ifdef WOLFTPM2_PEM_DECODE
35093509
if (derBuf != (byte*)input) {
3510+
TPM2_ForceZero(derBuf, derSz);
35103511
XFREE(derBuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
35113512
}
35123513
#endif
35133514

3515+
TPM2_ForceZero(&sens, sizeof(sens));
3516+
35143517
return rc;
35153518
}
35163519

0 commit comments

Comments
 (0)