Date: Wed, 22 Oct 2008 14:58:23 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r184163 - in releng/6.4/sys: . netinet6 Message-ID: <200810221458.m9MEwNMX031510@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Wed Oct 22 14:58:23 2008 New Revision: 184163 URL: http://svn.freebsd.org/changeset/base/184163 Log: MFC: r183923 Check that the mbuf len is positive (like we do in the v4 case) to avoid possible panics. PR: kern/119123 Approved by: re (kib) Modified: releng/6.4/sys/ (props changed) releng/6.4/sys/netinet6/ip6_output.c Modified: releng/6.4/sys/netinet6/ip6_output.c ============================================================================== --- releng/6.4/sys/netinet6/ip6_output.c Wed Oct 22 14:56:15 2008 (r184162) +++ releng/6.4/sys/netinet6/ip6_output.c Wed Oct 22 14:58:23 2008 (r184163) @@ -2979,7 +2979,7 @@ ip6_setpktopts(control, opt, stickyopt, if (control->m_next) return (EINVAL); - for (; control->m_len; control->m_data += CMSG_ALIGN(cm->cmsg_len), + for (; control->m_len > 0; control->m_data += CMSG_ALIGN(cm->cmsg_len), control->m_len -= CMSG_ALIGN(cm->cmsg_len)) { int error;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810221458.m9MEwNMX031510>