From 2f229f10b10b89e0a0253a104ac00cef274a77cf Mon Sep 17 00:00:00 2001 From: Sansar Choinyambuu Date: Wed, 28 Sep 2011 15:12:32 +0200 Subject: [PATCH] Clone chunk_t parameters in create function --- src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c | 4 ++-- src/libpts/tcg/tcg_pts_attr_dh_nonce_params_resp.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c b/src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c index 3a40df05a..1b147516e 100644 --- a/src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c +++ b/src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c @@ -231,8 +231,8 @@ pa_tnc_attr_t *tcg_pts_attr_dh_nonce_finish_create(u_int8_t nonce_len, .type = TCG_PTS_DH_NONCE_FINISH, .nonce_len = nonce_len, .hash_algo = hash_algo, - .initiator_nonce = initiator_nonce, - .initiator_pub_val = initiator_pub_val, + .initiator_nonce = chunk_clone(initiator_nonce), + .initiator_pub_val = chunk_clone(initiator_pub_val), ); return &this->public.pa_tnc_attribute; diff --git a/src/libpts/tcg/tcg_pts_attr_dh_nonce_params_resp.c b/src/libpts/tcg/tcg_pts_attr_dh_nonce_params_resp.c index d9954c29b..cbbea4f91 100644 --- a/src/libpts/tcg/tcg_pts_attr_dh_nonce_params_resp.c +++ b/src/libpts/tcg/tcg_pts_attr_dh_nonce_params_resp.c @@ -249,8 +249,8 @@ pa_tnc_attr_t *tcg_pts_attr_dh_nonce_params_resp_create(u_int8_t nonce_len, .nonce_len = nonce_len, .dh_group = dh_group, .hash_algo_set = hash_algo_set, - .responder_nonce = responder_nonce, - .responder_pub_val = responder_pub_val, + .responder_nonce = chunk_clone(responder_nonce), + .responder_pub_val = chunk_clone(responder_pub_val), ); return &this->public.pa_tnc_attribute;