Cloning chunk_t parameters in process message
authorSansar Choinyambuu <schoinya@hsr.ch>
Fri, 23 Sep 2011 14:05:21 +0000 (16:05 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 28 Nov 2011 14:54:02 +0000 (15:54 +0100)
src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c

index 89a0078..eeca38e 100644 (file)
@@ -190,7 +190,9 @@ METHOD(pa_tnc_attr_t, process, status_t,
        this->hash_algo = hash_algo;
        reader->read_data(reader, reader->remaining(reader) - this->nonce_len,
                                                                                &this->initiator_pub_val);
+       this->initiator_pub_val = chunk_clone(this->initiator_pub_val);
        reader->read_data(reader, this->nonce_len, &this->initiator_nonce);
+       this->initiator_nonce = chunk_clone(this->initiator_nonce);
        
 >>>>>>> Implemented Diffie Hellman Nonce attributes
        reader->destroy(reader);