idl2wrs: don't use -1 for the protocol-item length.

It doesn't work any more for empty (length==0) PDUs.

Similar to bug 10646/Ifb96768969a43c59367b73e7bb940ceeb02cf6b0 (for RPC).

Untested as I'm not set up to build IDL dissectors now.

Bug: 11134
Change-Id: I77aacc2590acbacbe02edb1768e754f92f87bc23
Reviewed-on: https://code.wireshark.org/review/8163
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
Jeff Morriss 2015-04-21 14:12:59 -04:00 committed by Evan Huus
parent 7ccab8a6e1
commit 3a42b55ac9
6 changed files with 6 additions and 6 deletions

View File

@ -341,7 +341,7 @@ start_dissecting(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ptree, int *offs
*/
if (ptree) {
ti = proto_tree_add_item(ptree, proto_coseventcomm, tvb, *offset, -1, ENC_NA);
ti = proto_tree_add_item(ptree, proto_coseventcomm, tvb, *offset, tvb_reported_length_remaining(tvb, *offset), ENC_NA);
tree = proto_item_add_subtree(ti, ett_coseventcomm);
}
return tree;

View File

@ -874,7 +874,7 @@ start_dissecting(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ptree, int *offs
*/
if (ptree) {
ti = proto_tree_add_item(ptree, proto_cosnaming, tvb, *offset, -1, ENC_NA);
ti = proto_tree_add_item(ptree, proto_cosnaming, tvb, *offset, tvb_reported_length_remaining(tvb, *offset), ENC_NA);
tree = proto_item_add_subtree(ti, ett_cosnaming);
}
return tree;

View File

@ -7028,7 +7028,7 @@ start_dissecting(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ptree, int *offs
*/
if (ptree) {
ti = proto_tree_add_item(ptree, proto_gias, tvb, *offset, -1, ENC_NA);
ti = proto_tree_add_item(ptree, proto_gias, tvb, *offset, tvb_reported_length_remaining(tvb, *offset), ENC_NA);
tree = proto_item_add_subtree(ti, ett_gias);
}
return tree;

View File

@ -56909,7 +56909,7 @@ start_dissecting(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ptree, int *offs
*/
if (ptree) {
ti = proto_tree_add_item(ptree, proto_parlay, tvb, *offset, -1, ENC_NA);
ti = proto_tree_add_item(ptree, proto_parlay, tvb, *offset, tvb_reported_length_remaining(tvb, *offset), ENC_NA);
tree = proto_item_add_subtree(ti, ett_parlay);
}
return tree;

View File

@ -2445,7 +2445,7 @@ start_dissecting(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ptree, int *offs
*/
if (ptree) {
ti = proto_tree_add_item(ptree, proto_tango, tvb, *offset, -1, ENC_NA);
ti = proto_tree_add_item(ptree, proto_tango, tvb, *offset, tvb_reported_length_remaining(tvb, *offset), ENC_NA);
tree = proto_item_add_subtree(ti, ett_tango);
}
return tree;

View File

@ -2564,7 +2564,7 @@ start_dissecting(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ptree, int *offs
*/
if (ptree) {
ti = proto_tree_add_item(ptree, proto_@dissname@, tvb, *offset, -1, ENC_NA);
ti = proto_tree_add_item(ptree, proto_@dissname@, tvb, *offset, tvb_reported_length_remaining(tvb, *offset), ENC_NA);
tree = proto_item_add_subtree(ti, ett_@dissname@);
}
return tree;