diff options
author | Sansar Choinyambuu <schoinya@hsr.ch> | 2011-09-23 16:05:21 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-11-28 14:34:20 +0100 |
commit | 808017f6b77d8ac4fc1e0ce4ce96731ff62cee86 (patch) | |
tree | e5a36674e163788487935c9d238d527f888a822b /src | |
parent | f27c30329dd0b46a62bee972b093874bb3664442 (diff) | |
download | strongswan-808017f6b77d8ac4fc1e0ce4ce96731ff62cee86.tar.bz2 strongswan-808017f6b77d8ac4fc1e0ce4ce96731ff62cee86.tar.xz |
Cloning chunk_t parameters in process message
Diffstat (limited to 'src')
-rw-r--r-- | src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c | 2 | ||||
-rw-r--r-- | src/libpts/tcg/tcg_pts_attr_dh_nonce_params_resp.c | 2 |
2 files changed, 4 insertions, 0 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 945a426fc..3a40df05a 100644 --- a/src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c +++ b/src/libpts/tcg/tcg_pts_attr_dh_nonce_finish.c @@ -158,7 +158,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); reader->destroy(reader); 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 92d9cd740..d9954c29b 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 @@ -168,7 +168,9 @@ METHOD(pa_tnc_attr_t, process, status_t, reader->read_uint16(reader, &hash_algo_set); this->hash_algo_set = hash_algo_set; reader->read_data(reader, this->nonce_len, &this->responder_nonce); + this->responder_nonce = chunk_clone(this->responder_nonce); reader->read_data(reader, reader->remaining(reader), &this->responder_pub_val); + this->responder_pub_val = chunk_clone(this->responder_pub_val); reader->destroy(reader); return SUCCESS; |