From 5f9ff208f21436c2d408c5969b0d13f7858bc74a Mon Sep 17 00:00:00 2001 From: gasbytes Date: Mon, 27 May 2024 22:10:22 +0200 Subject: [PATCH] memcmp -> memcpy --- src/tpm2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tpm2.c b/src/tpm2.c index 07ff4245..76a97638 100644 --- a/src/tpm2.c +++ b/src/tpm2.c @@ -373,7 +373,7 @@ static int TPM2_ResponseProcess(TPM2_CTX* ctx, TPM2_Packet* packet, /* Save off last known HMAC */ session->hmac.size = authRsp.hmac.size; - XMEMCMP(session->hmac.buffer, authRsp.hmac.buffer, + XMEMCPY(session->hmac.buffer, authRsp.hmac.buffer, authRsp.hmac.size); #else (void)cmdCode;