aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-jxta.c
diff options
context:
space:
mode:
authorrichardv <richardv@f5534014-38df-0310-8fa8-9805f1628bb7>2007-04-03 01:31:22 +0000
committerrichardv <richardv@f5534014-38df-0310-8fa8-9805f1628bb7>2007-04-03 01:31:22 +0000
commitac6c4eed25b7df63cdeace452dd851929bc556db (patch)
treebebaa8528c42d0bda93091d4d6d192c76008348f /epan/dissectors/packet-jxta.c
parent0582bdfb43d234fae278e1662720325b8d9ae10a (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21305 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-jxta.c')
-rw-r--r--epan/dissectors/packet-jxta.c14
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) {