From bf0ddf7ff3f2d23c8b964b9ec42f796a57a0c011 Mon Sep 17 00:00:00 2001 From: Dhanuka Warusadura Date: Thu, 24 Aug 2023 13:31:15 +0000 Subject: [PATCH] TPM2: fix `g_memdup` deprecated warning --- egg/egg-tpm2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/egg/egg-tpm2.c b/egg/egg-tpm2.c index 5d36ca2..cff19a8 100644 --- a/egg/egg-tpm2.c +++ b/egg/egg-tpm2.c @@ -407,7 +407,7 @@ egg_tpm2_decrypt_master_password(EggTpm2Context *context, data = g_variant_get_fixed_array(out_private_variant, &count, sizeof(guint8)); - guint8 *marshaled_out_private = g_memdup(data, count); + guint8 *marshaled_out_private = g_memdup2(data, count); count = 0; TPM2B_PRIVATE out_private = { @@ -434,7 +434,7 @@ egg_tpm2_decrypt_master_password(EggTpm2Context *context, data = g_variant_get_fixed_array(out_public_variant, &count, sizeof(guint8)); - guint8 *marshaled_out_public = g_memdup(data, count); + guint8 *marshaled_out_public = g_memdup2(data, count); TPM2B_PUBLIC out_public = { .size = 0