forked from osmocom/wireshark
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=5599
This commit is contained in:
parent
8ec09e1441
commit
ca03167c44
|
@ -2,7 +2,7 @@
|
|||
* Routines for afp packet dissection
|
||||
* Copyright 2002, Didier Gautheron <dgautheron@magic.fr>
|
||||
*
|
||||
* $Id: packet-afp.c,v 1.15 2002/05/11 22:40:40 guy Exp $
|
||||
* $Id: packet-afp.c,v 1.16 2002/05/30 05:26:05 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -2640,8 +2640,10 @@ dissect_afp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset = dissect_reply_afp_write(tvb, pinfo, afp_tree, offset);break;
|
||||
}
|
||||
}
|
||||
if (tree && offset < len)
|
||||
call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, afp_tree);
|
||||
if (tree && offset < len) {
|
||||
call_dissector(data_handle, tvb_new_subset(tvb, offset, -1, -1),
|
||||
pinfo, afp_tree);
|
||||
}
|
||||
}
|
||||
|
||||
static void afp_reinit( void)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for GVRP (GARP VLAN Registration Protocol) dissection
|
||||
* Copyright 2000, Kevin Shi <techishi@ms22.hinet.net>
|
||||
*
|
||||
* $Id: packet-gvrp.c,v 1.10 2002/01/21 07:36:34 guy Exp $
|
||||
* $Id: packet-gvrp.c,v 1.11 2002/05/30 05:26:05 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -145,7 +145,9 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
proto_tree_add_text(gvrp_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;
|
||||
}
|
||||
|
||||
|
@ -175,7 +177,8 @@ dissect_gvrp(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;
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +195,8 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* GVRP only supports one attribute type. */
|
||||
if (octet != GVRP_ATTRIBUTE_TYPE)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -225,7 +229,8 @@ dissect_gvrp(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;
|
||||
}
|
||||
}
|
||||
|
@ -256,7 +261,9 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
case GVRP_EVENT_LEAVEALL:
|
||||
if (octet != GVRP_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;
|
||||
|
@ -268,7 +275,9 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
case GVRP_EVENT_EMPTY:
|
||||
if (octet != GVRP_LENGTH_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;
|
||||
}
|
||||
|
||||
|
@ -281,7 +290,8 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-ipsec.c
|
||||
* Routines for IPsec/IPComp packet disassembly
|
||||
*
|
||||
* $Id: packet-ipsec.c,v 1.39 2002/05/10 23:20:38 guy Exp $
|
||||
* $Id: packet-ipsec.c,v 1.40 2002/05/30 05:26:05 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -229,7 +229,9 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_uint(esp_tree, hf_esp_sequence, tvb,
|
||||
offsetof(struct newesp, esp_seq), 4,
|
||||
(guint32)ntohl(esp.esp_seq));
|
||||
call_dissector(data_handle,tvb_new_subset(tvb, sizeof(struct newesp),-1,tvb_reported_length_remaining(tvb,sizeof(struct newesp))), pinfo, esp_tree);
|
||||
call_dissector(data_handle,
|
||||
tvb_new_subset(tvb, sizeof(struct newesp), -1, -1),
|
||||
pinfo, esp_tree);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -279,7 +281,9 @@ dissect_ipcomp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_uint(ipcomp_tree, hf_ipcomp_cpi, tvb,
|
||||
offsetof(struct ipcomp, comp_cpi), 2,
|
||||
ntohs(ipcomp.comp_cpi));
|
||||
call_dissector(data_handle,tvb_new_subset(tvb, sizeof(struct ipcomp), -1,tvb_reported_length_remaining(tvb,sizeof(struct ipcomp))),pinfo, ipcomp_tree);
|
||||
call_dissector(data_handle,
|
||||
tvb_new_subset(tvb, sizeof(struct ipcomp), -1, -1), pinfo,
|
||||
ipcomp_tree);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for OSPF packet disassembly
|
||||
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
|
||||
*
|
||||
* $Id: packet-ospf.c,v 1.67 2002/05/14 09:46:38 guy Exp $
|
||||
* $Id: packet-ospf.c,v 1.68 2002/05/30 05:26:05 guy Exp $
|
||||
*
|
||||
* At this time, this module is able to analyze OSPF
|
||||
* packets as specified in RFC2328. MOSPF (RFC1584) and other
|
||||
|
@ -634,7 +634,8 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
break;
|
||||
|
||||
default:
|
||||
call_dissector(data_handle,tvb_new_subset(tvb, ospf_header_length,-1,tvb_reported_length_remaining(tvb,ospf_header_length)), pinfo, tree);
|
||||
call_dissector(data_handle,
|
||||
tvb_new_subset(tvb, ospf_header_length, -1, -1), pinfo, tree);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue