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-isis-lsp.c | |
parent | 9d4c965c819bf9ff2e979db0fb18dd3d8d3cfd4c (diff) | |
download | wireshark-f2246ebb65b7640ecf7e17a974ef4521427dca47.tar.gz |
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-isis-lsp.c')
-rw-r--r-- | packet-isis-lsp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-isis-lsp.c b/packet-isis-lsp.c index b2c3c916f0..a79b9d68c4 100644 --- a/packet-isis-lsp.c +++ b/packet-isis-lsp.c @@ -1,7 +1,7 @@ /* packet-isis-lsp.c * Routines for decoding isis lsp packets and their CLVs * - * $Id: packet-isis-lsp.c,v 1.2 2000/01/15 00:22:32 gram Exp $ + * $Id: packet-isis-lsp.c,v 1.3 2000/01/24 03:33:32 guy Exp $ * Stuart Stanley <stuarts@mxmail.net> * * Ethereal - Network traffic analyzer @@ -790,10 +790,10 @@ isis_dissect_isis_lsp(int lsp_type, int header_length, hlen = sizeof(*ilp); - if (fd->cap_len < (offset + hlen)) { + if (!BYTES_ARE_IN_FRAME(offset, hlen)) { isis_dissect_unknown(offset, hlen, tree, fd, "not enough capture data for header (%d vs %d)", - hlen, offset - fd->cap_len); + hlen, END_OF_FRAME); return; } @@ -801,7 +801,7 @@ isis_dissect_isis_lsp(int lsp_type, int header_length, if (tree) { ti = proto_tree_add_item(tree, proto_isis_lsp, - offset, fd->cap_len - offset, NULL); + offset, END_OF_FRAME, NULL); lsp_tree = proto_item_add_subtree(ti, ett_isis_lsp); proto_tree_add_item(lsp_tree, hf_isis_lsp_pdu_length, offset, 2, pntohs(&ilp->isis_lsp_pdu_length)); |