diff options
author | Richard van der Hoff <richardv@mxtelecom.com> | 2007-04-03 01:31:22 +0000 |
---|---|---|
committer | Richard van der Hoff <richardv@mxtelecom.com> | 2007-04-03 01:31:22 +0000 |
commit | 2c14858aefc421406e36941f25b93542a843b6b1 (patch) | |
tree | bebaa8528c42d0bda93091d4d6d192c76008348f /epan/dissectors/packet-jxta.c | |
parent | 4d185950d78545a3cb004afc5b6f79369549821d (diff) | |
download | wireshark-2c14858aefc421406e36941f25b93542a843b6b1.tar.gz wireshark-2c14858aefc421406e36941f25b93542a843b6b1.tar.bz2 wireshark-2c14858aefc421406e36941f25b93542a843b6b1.zip |
From Mike Duigou:
The enclosed patch corrects a problem where jxta elements were being added to the protocol tree for segments that did not contain complete jxta frames. This patch ensures that the jxta proto elements are only added those the segments that end a complete, assembled jxta frame.
The patch has been fuzz tested with a broad selection of jxta captures and ran successfully overnight for over 4000 iterations.
svn path=/trunk/; revision=21305
Diffstat (limited to 'epan/dissectors/packet-jxta.c')
-rw-r--r-- | epan/dissectors/packet-jxta.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c index 19228ef473..6bb6a5ef56 100644 --- a/epan/dissectors/packet-jxta.c +++ b/epan/dissectors/packet-jxta.c @@ -839,13 +839,6 @@ static int dissect_jxta_stream(tvbuff_t * tvb, packet_info * pinfo, proto_tree * goto Common_Exit; } - jxta_tree_item = - proto_tree_add_protocol_format(tree, proto_jxta, tvb, offset, -1, "JXTA" ); - jxta_tree = proto_item_add_subtree(jxta_tree_item, ett_jxta); - - /* Redo header processing, this time populating the tree. */ - headers_len = dissect_jxta_message_framing(tvb, pinfo, jxta_tree, &content_length, &content_type); - available = tvb_reported_length_remaining(tvb, offset + headers_len); if (available >= content_length) { tvbuff_t *jxta_message_tvb = tvb_new_subset(tvb, offset + headers_len, (gint) content_length, (gint) content_length); @@ -857,6 +850,13 @@ static int dissect_jxta_stream(tvbuff_t * tvb, packet_info * pinfo, proto_tree * port_type saved_port_type = PT_NONE; gboolean dissected; + jxta_tree_item = + proto_tree_add_protocol_format(tree, proto_jxta, tvb, offset, -1, "JXTA" ); + jxta_tree = proto_item_add_subtree(jxta_tree_item, ett_jxta); + + /* Redo header processing, this time populating the tree. */ + headers_len = dissect_jxta_message_framing(tvb, pinfo, jxta_tree, &content_length, &content_type); + tpt_conversation = get_tpt_conversation(pinfo, TRUE); if (NULL != tpt_conversation) { |