diff options
author | darrenr <darrenr@FreeBSD.org> | 2007-06-04 02:50:28 +0000 |
---|---|---|
committer | darrenr <darrenr@FreeBSD.org> | 2007-06-04 02:50:28 +0000 |
commit | e2e28d4361fc9bdb67694eedaf349bdc7ca088a3 (patch) | |
tree | f9efeb29d9992430924bdce513e7199c9397ac36 /contrib/ipfilter/lib/ipft_td.c | |
parent | 092f5d1218f4867a87b382d75613b9d2b3e56c18 (diff) | |
download | FreeBSD-src-e2e28d4361fc9bdb67694eedaf349bdc7ca088a3.zip FreeBSD-src-e2e28d4361fc9bdb67694eedaf349bdc7ca088a3.tar.gz |
Import IPFilter 4.1.23 to vendor branch.
See src/contrib/ipfilter/HISTORY for details of changes since 4.1.13
Diffstat (limited to 'contrib/ipfilter/lib/ipft_td.c')
-rw-r--r-- | contrib/ipfilter/lib/ipft_td.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/ipfilter/lib/ipft_td.c b/contrib/ipfilter/lib/ipft_td.c index 1aa6166..21bb764 100644 --- a/contrib/ipfilter/lib/ipft_td.c +++ b/contrib/ipfilter/lib/ipft_td.c @@ -1,9 +1,9 @@ /* - * Copyright (C) 1993-2001 by Darren Reed. + * Copyright (C) 2000-2006 by Darren Reed. * * See the IPFILTER.LICENCE file for details on licencing. * - * $Id: ipft_td.c,v 1.15 2004/01/08 13:34:31 darrenr Exp $ + * $Id: ipft_td.c,v 1.15.2.2 2006/06/16 17:21:03 darrenr Exp $ */ /* @@ -40,7 +40,7 @@ tcpdump -nqte #if !defined(lint) static const char sccsid[] = "@(#)ipft_td.c 1.8 2/4/96 (C)1995 Darren Reed"; -static const char rcsid[] = "@(#)$Id: ipft_td.c,v 1.15 2004/01/08 13:34:31 darrenr Exp $"; +static const char rcsid[] = "@(#)$Id: ipft_td.c,v 1.15.2.2 2006/06/16 17:21:03 darrenr Exp $"; #endif static int tcpd_open __P((char *)); @@ -142,6 +142,8 @@ int cnt, *dir; IP_HL_A(ip, sizeof(ip_t)); s = strtok(misc, " :"); + if (s == NULL) + return 0; ip->ip_p = getproto(s); switch (ip->ip_p) @@ -149,6 +151,8 @@ int cnt, *dir; case IPPROTO_TCP : case IPPROTO_UDP : s = strtok(NULL, " :"); + if (s == NULL) + return 0; ip->ip_len += atoi(s); if (ip->ip_p == IPPROTO_TCP) extra = sizeof(struct tcphdr); |