Clone chunk_t parameters in create function
[strongswan.git] / src / libpts / tcg / tcg_pts_attr_dh_nonce_finish.c
index 3a40df0..1b14751 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;