summaryrefslogtreecommitdiff
path: root/print-mobile.c
diff options
context:
space:
mode:
authorguy <guy>2004-03-24 01:58:14 +0000
committerguy <guy>2004-03-24 01:58:14 +0000
commitf3fa55c03f11f679a7044b910edeecc4c4dc7c23 (patch)
tree298ed29787c30d118a39071802530292cdf7b3bc /print-mobile.c
parent4a142923b2c247ef82a0174af4882a3975437f06 (diff)
downloadtcpdump-f3fa55c03f11f679a7044b910edeecc4c4dc7c23.tar.gz
Add bounds checking.
Diffstat (limited to 'print-mobile.c')
-rw-r--r--print-mobile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print-mobile.c b/print-mobile.c
index e7de19dc..816ffd6e 100644
--- a/print-mobile.c
+++ b/print-mobile.c
@@ -42,7 +42,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.14 2003-11-16 09:36:28 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.15 2004-03-24 01:58:14 guy Exp $";
#endif
#include <tcpdump-stdinc.h>
@@ -77,7 +77,7 @@ mobile_print(const u_char *bp, u_int length)
mob = (const struct mobile_ip *)bp;
- if (length < MOBILE_SIZE) {
+ if (length < MOBILE_SIZE || !TTEST(*mob)) {
fputs("[|mobile]", stdout);
return;
}