]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Clone chunk_t parameters in create function
authorSansar Choinyambuu <schoinya@hsr.ch>
Wed, 28 Sep 2011 13:12:32 +0000 (15:12 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 28 Nov 2011 13:34:20 +0000 (14:34 +0100)
src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c
src/libpts/tcg/tcg_pts_attr_dh_nonce_params_resp.c

index 3a40df05ad953445de7a854bc52c252922f29ca9..1b147516e11f3ae51fa9a5e1ccdcdf86eca5b387 100644 (file)
@@ -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;
index d9954c29b9891f752a69383ef4687c5b64e9bf38..cbbea4f91d58a97017a25eaddcdc1795b2bb791c 100644 (file)
@@ -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;