diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-05-30 02:04:43 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-05-30 02:04:43 +0000 |
commit | 8ec09e1441fc74bb72b69449c4c6704ea0784da8 (patch) | |
tree | 577b24c92acf03848b64ab3a4a622b309c493943 /packet-gmrp.c | |
parent | 4401f1433f8b2db82cf199274f96258662d02aeb (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.
svn path=/trunk/; revision=5598
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; } } |