IP6_EXTHDR_GET0 had no check against m->m_len (noone was using this macro).
sync with kame
This commit is contained in:
parent
cc1cf30d01
commit
c3740d7821
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ip6.h,v 1.11 2001/01/23 07:21:07 itojun Exp $ */
|
||||
/* $NetBSD: ip6.h,v 1.12 2001/07/05 23:41:07 itojun Exp $ */
|
||||
/* $KAME: ip6.h,v 1.14 2000/10/09 01:04:09 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -279,8 +279,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) { \
|
||||
|
|
Loading…
Reference in New Issue