IP6_EXTHDR_GET0 had no check against m->m_len (noone was using this macro).

sync with kame
This commit is contained in:
itojun 2001-07-05 23:41:07 +00:00
parent cc1cf30d01
commit c3740d7821
1 changed files with 3 additions and 3 deletions

View File

@ -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) { \