mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 13:44:55 +00:00
correct space check
Submitted by: ume
This commit is contained in:
parent
d34fd3c7e0
commit
afa3570d6f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143323
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue