aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/docsis/packet-tlv.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-12-13 03:18:38 +0000
committerGuy Harris <guy@alum.mit.edu>2003-12-13 03:18:38 +0000
commitc20f75c872ff560b2d7a612c80dc1ce1d2be4331 (patch)
tree3796da836583fa87bfb67e91757c4fa47801e396 /plugins/docsis/packet-tlv.c
parentd64affe0a47c0a5b31687adbd3849648fc206201 (diff)
Use "int"s, not "guint16"s, as packet offsets (using values shorter
than32 bits risks overflow problems). Use "gint" for tvbuff lengths. Use -1 for uses of "tvb_length_remaining()" that mean "the rest of the tvbuff"; use "tvb_reported_length_remaining()" for "the rest of the packet. Clean up the handling of the DOCSIS payload. svn path=/trunk/; revision=9267
Diffstat (limited to 'plugins/docsis/packet-tlv.c')
-rw-r--r--plugins/docsis/packet-tlv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/docsis/packet-tlv.c b/plugins/docsis/packet-tlv.c
index 319ba43602..ce0d8bd79d 100644
--- a/plugins/docsis/packet-tlv.c
+++ b/plugins/docsis/packet-tlv.c
@@ -2,7 +2,7 @@
* Routines to Dissect Appendix C TLV's
* Copyright 2002, Anand V. Narwani <anand[AT]narwani.org>
*
- * $Id: packet-tlv.c,v 1.15 2003/12/13 02:38:33 guy Exp $
+ * $Id: packet-tlv.c,v 1.16 2003/12/13 03:18:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1783,14 +1783,13 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
proto_item *it;
proto_tree *tlv_tree;
- guint16 total_len;
int pos = 0;
+ gint total_len;
guint8 type, length;
guint16 x;
tvbuff_t *vsif_tvb;
- total_len = tvb_length_remaining (tvb, 0);
-
+ total_len = tvb_reported_length_remaining (tvb, 0);
if (tree)
{