From 59df5f6f55f8614aee47f937eaa956079e270ed6 Mon Sep 17 00:00:00 2001 From: Juergen Repp Date: Thu, 28 Nov 2024 17:22:12 +0100 Subject: [PATCH] MU: Remove unneeded cast in TPM2B_UNMARSHAL. An uneeded cast was removed, because the name of the used buffer was passed to TPM2B_UNMARSHAL and could be used. Signed-off-by: Juergen Repp --- src/tss2-mu/tpm2b-types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tss2-mu/tpm2b-types.c b/src/tss2-mu/tpm2b-types.c index 6d55fb360..969a4cba6 100644 --- a/src/tss2-mu/tpm2b-types.c +++ b/src/tss2-mu/tpm2b-types.c @@ -147,7 +147,7 @@ TSS2_RC Tss2_MU_##type##_Unmarshal(uint8_t const buffer[], size_t buffer_size, \ \ if (dest != NULL) { \ dest->size = size; \ - memcpy(((TPM2B *)dest)->buffer, &buffer[local_offset], size); \ + memcpy(&dest->buf_name, &buffer[local_offset], size); \ } \ local_offset += size; \ if (offset != NULL) { \