Ethereal-dev: [Ethereal-dev] [PATCH] packet-ppp.c highlights wrong number of octets

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Charles Levert <chuck@xxxxxxxxxxxxxxxx>
Date: Sat, 30 Oct 2004 03:02:31 -0400
Hi.

When the main heading "Point-to-Point Protocol" is selected in the packet
details pane, too many octets (more than are available) are highlighted
in the packet octets pane.  This number included the PPP header and the
following payload, plus the PPP header again.  It now only contains the
PPP header, which is the same behavior as other top-level dissectors.

This bug probably did not manifest itself for PPP over HDLC; it have no
way to test it myself.  It was probably present in all other cases.



--- epan/dissectors/packet-ppp.c.svn-12117	2004-10-30 00:25:40.000000000 -0400
+++ epan/dissectors/packet-ppp.c	2004-10-30 02:19:21.000000000 -0400
@@ -2879,7 +2879,7 @@ dissect_ppp( tvbuff_t *tvb, packet_info 
   proto_tree *fh_tree = NULL;
 
   if(tree) {
-    ti = proto_tree_add_item(tree, proto_ppp, tvb, 0, -1, FALSE);
+    ti = proto_tree_add_item(tree, proto_ppp, tvb, 0, 0, FALSE);
     fh_tree = proto_item_add_subtree(ti, ett_ppp);
   }