summaryrefslogtreecommitdiff
path: root/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/security/tpm/tss/tcg-2.0/tss_marshaling.c')
-rw-r--r--src/security/tpm/tss/tcg-2.0/tss_marshaling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
index 345aec5124..ec3cd8b4b2 100644
--- a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
+++ b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
@@ -84,7 +84,7 @@ static int marshal_TPMT_HA(struct obuf *ob, TPMT_HA *tpmtha)
rc |= marshal_TPMI_ALG_HASH(ob, tpmtha->hashAlg);
rc |= obuf_write(ob, tpmtha->digest.sha256,
- sizeof(tpmtha->digest.sha256));
+ tlcl_get_hash_size_from_algo(tpmtha->hashAlg));
return rc;
}