summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/ipsec.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-03-09 15:28:48 +0000
committersam <sam@FreeBSD.org>2005-03-09 15:28:48 +0000
commit291aff4a04c843d325b34845040d73a130a33e6e (patch)
tree2a45f0fc3fe93de39ee04b9f92a82879d6e4c4fa /sys/netipsec/ipsec.c
parent6cc5b893d530f8cbf5e3f7b98d6e871693b006f2 (diff)
downloadFreeBSD-src-291aff4a04c843d325b34845040d73a130a33e6e.zip
FreeBSD-src-291aff4a04c843d325b34845040d73a130a33e6e.tar.gz
correct space check
Submitted by: ume
Diffstat (limited to 'sys/netipsec/ipsec.c')
-rw-r--r--sys/netipsec/ipsec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c
index 51b39ed..b2c31d0 100644
--- a/sys/netipsec/ipsec.c
+++ b/sys/netipsec/ipsec.c
@@ -669,7 +669,7 @@ ipsec4_get_ulp(struct mbuf *m, struct secpolicyindex *spidx, int needport)
spidx->dst.sin.sin_port = uh.uh_dport;
return;
case IPPROTO_AH:
- if (m->m_pkthdr.len > off + sizeof(ip6e))
+ if (off + sizeof(ip6e) > m->m_pkthdr.len)
goto done;
/* XXX sigh, this works but is totally bogus */
m_copydata(m, off, sizeof(ip6e), (caddr_t) &ip6e);
OpenPOWER on IntegriCloud