aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-stun.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-08-09 00:20:18 +0000
committerGerald Combs <gerald@wireshark.org>2012-08-09 00:20:18 +0000
commite9b6fa072e1e699fa6db98e1099f69664eec5d6f (patch)
treeeba96eadcfd60f5b15c0fc4ce1748075018cbee3 /epan/dissectors/packet-stun.c
parentadcb1775f6c0c4d96b0ad4e618e2e322d65f8b01 (diff)
se_tree_lookup32_array() can destroy its key. Make sure we refresh it
before passing it to se_tree_insert32_array(). Fixes bug 7569 reported by Laurent Butti. svn path=/trunk/; revision=44366
Diffstat (limited to 'epan/dissectors/packet-stun.c')
-rw-r--r--epan/dissectors/packet-stun.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-stun.c b/epan/dissectors/packet-stun.c
index 3927ab8c9f..bc40e4874f 100644
--- a/epan/dissectors/packet-stun.c
+++ b/epan/dissectors/packet-stun.c
@@ -480,6 +480,12 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
if ((stun_trans =
se_tree_lookup32_array(stun_info->transaction_pdus,
transaction_id_key)) == NULL) {
+
+ transaction_id_key[0].length = 3;
+ transaction_id_key[0].key = transaction_id;
+ transaction_id_key[1].length = 0;
+ transaction_id_key[1].key = NULL;
+
stun_trans=se_alloc(sizeof(stun_transaction_t));
stun_trans->req_frame=0;
stun_trans->rep_frame=0;