diff options
author | 2008-02-24 23:31:30 +0000 | |
---|---|---|
committer | 2008-02-24 23:31:30 +0000 | |
commit | 1ee8da941ab6f22fb49207de0d4d273e3215df3a (patch) | |
tree | c3c1171167f3915637f201153de6724a26621579 | |
parent | Add commented out Bluetooth HID section (diff) | |
download | wireguard-openbsd-1ee8da941ab6f22fb49207de0d4d273e3215df3a.tar.xz wireguard-openbsd-1ee8da941ab6f22fb49207de0d4d273e3215df3a.zip |
Correctly check that we have a complete rthdr before trying to do m_copydata() on it.
Bug report and fix from Todd Carson.
-rw-r--r-- | sys/netinet6/ip6_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index f101308eb9d..15eeaddb644 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.81 2008/02/05 22:57:31 mpf Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.82 2008/02/24 23:31:30 mcbride Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -739,7 +739,7 @@ ip6_check_rh0hdr(struct mbuf *m) return (1); } - if (off + sizeof(opt6) > lim) { + if (off + sizeof(rthdr) > lim) { /* packet to short to make sense */ return (1); } |