aboutsummaryrefslogtreecommitdiffstats
path: root/packet-icq.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-icq.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-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))