aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'packet-ip.c')
-rw-r--r--packet-ip.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/packet-ip.c b/packet-ip.c
index b539534497..c1bb7e69a2 100644
--- a/packet-ip.c
+++ b/packet-ip.c
@@ -1,7 +1,7 @@
/* packet-ip.c
* Routines for IP and miscellaneous IP protocol packet disassembly
*
- * $Id: packet-ip.c,v 1.69 2000/01/20 21:34:12 guy Exp $
+ * $Id: packet-ip.c,v 1.70 2000/01/23 08:55:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -311,7 +311,11 @@ typedef struct _e_ip
void
-capture_ip(const u_char *pd, int offset, guint32 cap_len, packet_counts *ld) {
+capture_ip(const u_char *pd, int offset, packet_counts *ld) {
+ if (!BYTES_ARE_IN_FRAME(offset, IPH_MIN_LEN)) {
+ ld->other++;
+ return;
+ }
switch (pd[offset + 9]) {
case IP_PROTO_TCP:
ld->tcp++;