From 4c17cb98b22feb879a6decab92923977c74feb76 Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 26 Nov 2006 13:24:07 +0000 Subject: [PATCH 1/1] From Stefan Metzmacher: I have a little additional patch, that makes it easier to see what which bytes are not caught by the sub_dissector. And it makes it easy to select and export the full payload to a file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19987 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-dcerpc.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index e90410c7e8..14b852147d 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -2295,19 +2295,26 @@ dcerpc_try_handoff (packet_info *pinfo, proto_tree *tree, * dissect; just re-throw that exception. */ TRY { + int remaining; + offset = sub_dissect (stub_tvb, 0, pinfo, sub_tree, drep); - if(tree && offset > 0) { - proto_item_set_len(sub_item, offset); - } /* If we have a subdissector and it didn't dissect all data in the tvb, make a note of it. */ - if (tvb_reported_length_remaining(stub_tvb, offset) > 0) { + remaining = tvb_reported_length_remaining(stub_tvb, offset); + if (remaining > 0) { + proto_tree_add_text(sub_tree, stub_tvb, offset, + remaining, + "[Long frame (%d byte%s)]", + remaining, + plurality(remaining, "", "s")); if (check_col(pinfo->cinfo, COL_INFO)) col_append_fstr(pinfo->cinfo, COL_INFO, - "[Long frame (%d bytes)]", - tvb_reported_length_remaining(stub_tvb, offset)); + "[Long frame (%d byte%s)]", + remaining, + plurality(remaining, "", "s")); + } } CATCH(BoundsError) { RETHROW; -- 2.34.1