diff options
author | sam <sam@FreeBSD.org> | 2005-03-09 15:28:48 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-03-09 15:28:48 +0000 |
commit | 291aff4a04c843d325b34845040d73a130a33e6e (patch) | |
tree | 2a45f0fc3fe93de39ee04b9f92a82879d6e4c4fa /sys/netipsec | |
parent | 6cc5b893d530f8cbf5e3f7b98d6e871693b006f2 (diff) | |
download | FreeBSD-src-291aff4a04c843d325b34845040d73a130a33e6e.zip FreeBSD-src-291aff4a04c843d325b34845040d73a130a33e6e.tar.gz |
correct space check
Submitted by: ume
Diffstat (limited to 'sys/netipsec')
-rw-r--r-- | sys/netipsec/ipsec.c | 2 |
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); |