aboutsummaryrefslogtreecommitdiffstats
path: root/packet-nfs.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-08-06 07:22:38 +0000
committerGuy Harris <guy@alum.mit.edu>2000-08-06 07:22:38 +0000
commit61aefd7470ac7ff134dfa3245033f6fabaae6285 (patch)
tree15fd7095c9d57da2f1ec8b38841613236c1a1740 /packet-nfs.c
parent10fe2ebd843b25c2295ac19c8e48cf353d45f165 (diff)
Don't use "fd->pkt_len" when checking to see if you've run off the end
of the packet, use "pi.captured_len" - "fd->pkt_len" may include data that isn't in the capture, due to a short snapshot length. Don't use "fd->cap_len" when checking to see if you've run off the end of the packe, use "pi.captured_len" - "fd->cap_len" isn't adjusted to reflect any length fields, but "pi.captured_len" is (removing, for example, Ethernet padding from the packet). Use "END_OF_FRAME" rather than "pi.captured_len - offset", to make it a bit clearer what's being done. In the V.120 dissector, use "tvb_length()" when adding the top-level protocol tree entry for V.120, as it's a tvbuffified dissector. svn path=/trunk/; revision=2214
Diffstat (limited to 'packet-nfs.c')
-rw-r--r--packet-nfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-nfs.c b/packet-nfs.c
index 8f53a97207..c813701ef2 100644
--- a/packet-nfs.c
+++ b/packet-nfs.c
@@ -2,7 +2,7 @@
* Routines for nfs dissection
* Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
*
- * $Id: packet-nfs.c,v 1.32 2000/08/03 19:27:19 guy Exp $
+ * $Id: packet-nfs.c,v 1.33 2000/08/06 07:22:35 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -472,10 +472,10 @@ dissect_fhandle_data(const u_char *pd, int offset, frame_data* fd, proto_tree *t
/* Make use of the new tvbuf code.
There is no way to get the packet_info here. So we have to
create a totally new tvbuf. */
- realtvb = tvb_new_real_data(pd, fd->cap_len, fd->pkt_len);
+ realtvb = tvb_new_real_data(pd, pi.captured_len, pi.len);
tvb = tvb_new_subset(realtvb, offset,
- fd->cap_len - offset,
- fd->pkt_len - offset);
+ pi.captured_len - offset,
+ pi.len - offset);
/* filehandle too long */
if (fhlen>64) goto type_ready;