diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-05-30 02:04:43 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-05-30 02:04:43 +0000 |
commit | 5f070c161d68380e6408e35a098787fa26a393a2 (patch) | |
tree | 577b24c92acf03848b64ab3a4a622b309c493943 /packet-gmrp.c | |
parent | 38783948ca7f4b47c215c49bff380518ee8be60d (diff) |
Don't pass "tvb_reported_length_remaining(tvb, offset)" as the fourth
argument to "tvb_new_subset()" - just use -1 if the subset tvbuff is to
run to the end of the parent tvbuff.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5598 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-gmrp.c')
-rw-r--r-- | packet-gmrp.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/packet-gmrp.c b/packet-gmrp.c index 07478d1c6b..3df5921d49 100644 --- a/packet-gmrp.c +++ b/packet-gmrp.c @@ -159,7 +159,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_text(gmrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16), " (Warning: this version of Ethereal only knows about protocol id = 1)"); - call_dissector(data_handle,tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1,tvb_reported_length_remaining(tvb,GARP_PROTOCOL_ID + sizeof(guint16))),pinfo, tree); + call_dissector(data_handle, + tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1, -1), + pinfo, tree); return; } @@ -189,7 +191,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); + call_dissector(data_handle, + tvb_new_subset(tvb, offset, -1, -1), + pinfo, tree); return; } } @@ -206,7 +210,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* GMRP supports Group Membership and Service Requirement as attribute types */ if ( (octet != GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP) && (octet != GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT) ) { - call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); + call_dissector(data_handle, + tvb_new_subset(tvb, offset, -1, -1), pinfo, + tree); return; } @@ -239,7 +245,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); + call_dissector(data_handle, + tvb_new_subset(tvb, offset, -1, -1), + pinfo, tree); return; } } @@ -270,7 +278,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case GMRP_EVENT_LEAVEALL: if (octet != GMRP_LENGTH_LEAVEALL) { - call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); + call_dissector(data_handle, + tvb_new_subset(tvb, offset, -1, -1), + pinfo, tree); return; } break; @@ -282,7 +292,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case GMRP_EVENT_EMPTY: if ( (octet != GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL) && (octet != GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL) ) { - call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); + call_dissector(data_handle, + tvb_new_subset(tvb, offset, -1, -1), + pinfo, tree); return; } @@ -309,14 +321,18 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); + call_dissector(data_handle, + tvb_new_subset(tvb, offset, -1, -1), + pinfo, tree); return; } break; default: - call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); + call_dissector(data_handle, + tvb_new_subset(tvb, offset, -1, -1), + pinfo, tree); return; } } |