diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2016-05-25 17:35:43 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-05-26 01:56:12 +0000 |
commit | 0bc1cdd9f3692e953bae2ce47fe58e5a0ab7ffd2 (patch) | |
tree | 05f5ed24e271449d825e57ad968413dc2f85704f /epan/dissectors/packet-jxta.c | |
parent | b9487a7fac74daa89346f44c1d8b800a436ddb15 (diff) |
Fix dissection of JXTA over UDP.
Prior to this change all JXTA-over-UDP frames throw an exception after setting
COL_PROTOCOL.
The offset used when adding the protocol to the tree had already been
incremented to point to the end of the TVB; use tree_offset (which is the
current offset) instead.
This code has been here since r17282 (2006) so presumably the change is that
proto_tree_add_protocol_format() started throwing an exception when offset
points to the end of the TVB sometime between then and now.
Change-Id: Iadbcada29cd235e8abe5662b825a2d97ff6f7308
Reviewed-on: https://code.wireshark.org/review/15560
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-jxta.c')
-rw-r--r-- | epan/dissectors/packet-jxta.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c index f2eb07da08..465c18ff62 100644 --- a/epan/dissectors/packet-jxta.c +++ b/epan/dissectors/packet-jxta.c @@ -530,7 +530,7 @@ static int dissect_jxta_udp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tr { guint tree_offset = 0; proto_item *jxta_tree_item = - proto_tree_add_protocol_format(tree, proto_jxta, tvb, offset, -1, "JXTA" ); + proto_tree_add_protocol_format(tree, proto_jxta, tvb, tree_offset, -1, "JXTA" ); proto_tree *jxta_tree = proto_item_add_subtree(jxta_tree_item, ett_jxta); proto_item *jxta_udp_tree_item = proto_tree_add_none_format(jxta_tree, hf_jxta_udp, tvb, tree_offset, -1, "JXTA UDP Message"); @@ -1336,7 +1336,7 @@ static int dissect_jxta_message(tvbuff_t * tvb, packet_info * pinfo, proto_tree } if ((needed > 0) && gDESEGMENT && pinfo->can_desegment) { - /* g_message( "Message requesting %d more bytes", needed ); */ + /* g_message("Frame %d: Message requesting %d more bytes", pinfo->num, needed); */ pinfo->desegment_offset = 0; pinfo->desegment_len = needed; return -needed; |