aboutsummaryrefslogtreecommitdiffstats
path: root/packet-icq.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-08-06 07:22:38 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-08-06 07:22:38 +0000
commita3dd49742a0ca5198d2c0650dedd37626b252d6c (patch)
tree15fd7095c9d57da2f1ec8b38841613236c1a1740 /packet-icq.c
parentb90978d08519624e351848eaae4dc750968deb93 (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2214 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-icq.c')
-rw-r--r--packet-icq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-icq.c b/packet-icq.c
index 9cbe6260a7..a7b465adf6 100644
--- a/packet-icq.c
+++ b/packet-icq.c
@@ -1,7 +1,7 @@
/* packet-icq.c
* Routines for ICQ packet disassembly
*
- * $Id: packet-icq.c,v 1.17 2000/08/05 00:55:55 guy Exp $
+ * $Id: packet-icq.c,v 1.18 2000/08/06 07:22:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Johan Feyaerts
@@ -2260,7 +2260,7 @@ dissect_icqv5Server(const u_char *pd,
seqnum1 = pletohs(&pd[ICQ5_SRV_SEQNUM1]);
seqnum2 = pletohs(&pd[ICQ5_SRV_SEQNUM2]);
if (pktsize == -1)
- pktsize = fd->pkt_len - offset;
+ pktsize = END_OF_FRAME;
decr_pd = pd;
if (changeCol && check_col(fd, COL_INFO))