1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

reported from VANHULLEBUS Yvan [remote kernel crash may result]

Submitted by:	itojun
Obtained from:	KAME
MFC after:	1 day
This commit is contained in:
Hajimu UMEMOTO 2005-03-09 14:39:48 +00:00
parent 8413f1ccdd
commit d34fd3c7e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143322

View File

@ -1007,7 +1007,7 @@ ipsec4_get_ulp(m, spidx, needport)
uh.uh_dport;
return;
case IPPROTO_AH:
if (m->m_pkthdr.len > off + sizeof(ip6e))
if (off + sizeof(ip6e) > m->m_pkthdr.len)
return;
m_copydata(m, off, sizeof(ip6e), (caddr_t)&ip6e);
off += (ip6e.ip6e_len + 2) << 2;