diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-07-05 23:41:35 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-07-05 23:41:35 +0000 |
commit | 96754ab490713d112573dea1937460e93e78b737 (patch) | |
tree | 111c157ebe7b00c4e15e6f224755d8257e448fa4 /sys | |
parent | 5dd2c2d50a8e3bab9a4792c7d594fff5bcd1b9cf (diff) |
IP6_EXTHDR_GET0 did not check m->m_len (noone was using this macro).
sync with kame
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip6.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h index c189cc9d5f3..c86728cdbc8 100644 --- a/sys/netinet/ip6.h +++ b/sys/netinet/ip6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6.h,v 1.7 2001/06/09 07:03:41 angelos Exp $ */ +/* $OpenBSD: ip6.h,v 1.8 2001/07/05 23:41:34 itojun Exp $ */ /* $KAME: ip6.h,v 1.14 2000/10/09 01:04:09 itojun Exp $ */ /* @@ -280,8 +280,8 @@ do { \ #define IP6_EXTHDR_GET0(val, typ, m, off, len) \ do { \ struct mbuf *t; \ - if ((off) == 0) \ - (val) = (typ)mtod(m, caddr_t); \ + if ((off) == 0 && (m)->m_len >= len) \ + (val) = (typ)mtod((m), caddr_t); \ else { \ t = m_pulldown((m), (off), (len), NULL); \ if (t) { \ |