diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-01-24 03:33:35 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-01-24 03:33:35 +0000 |
commit | f2246ebb65b7640ecf7e17a974ef4521427dca47 (patch) | |
tree | 0e9b2b89c52b9e6ccceab293202cf1051f4b1c5f /packet-data.c | |
parent | 9d4c965c819bf9ff2e979db0fb18dd3d8d3cfd4c (diff) | |
download | wireshark-f2246ebb65b7640ecf7e17a974ef4521427dca47.tar.gz wireshark-f2246ebb65b7640ecf7e17a974ef4521427dca47.tar.bz2 wireshark-f2246ebb65b7640ecf7e17a974ef4521427dca47.zip |
Fix a bunch of dissectors to use "pi.captured_len" rather than
"fd->cap_len" for the frame length - or to use macros such as
"BYTES_ARE_IN_FRAME()", "IS_DATA_IN_FRAME()", and "END_OF_FRAME", which
use "pi.captured_len" - so that they correctly handle frames where the
actual data length of the packet is less than the size of the raw frame,
e.g. with encapsulations such as ISL.
svn path=/trunk/; revision=1530
Diffstat (limited to 'packet-data.c')
-rw-r--r-- | packet-data.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-data.c b/packet-data.c index 1891e7651f..653ab246be 100644 --- a/packet-data.c +++ b/packet-data.c @@ -2,7 +2,7 @@ * Routines for raw data (default case) * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-data.c,v 1.13 2000/01/22 06:22:13 guy Exp $ + * $Id: packet-data.c,v 1.14 2000/01/24 03:33:35 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -41,9 +41,9 @@ int proto_data = -1; void -dissect_data(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { - - if (fd->cap_len > offset && tree) { +dissect_data(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) +{ + if (IS_DATA_IN_FRAME(offset) && tree) { proto_tree_add_item_format(tree, proto_data, offset, END_OF_FRAME, NULL, "Data (%d byte%s)", END_OF_FRAME, plurality(END_OF_FRAME, "", "s")); |