svn commit: r184117 - in stable/7/sys: . netinet6

Bjoern A. Zeeb bz at FreeBSD.org
Tue Oct 21 09:45:03 UTC 2008


Author: bz
Date: Tue Oct 21 09:45:02 2008
New Revision: 184117
URL: http://svn.freebsd.org/changeset/base/184117

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:
  stable/7/sys/   (props changed)
  stable/7/sys/netinet6/ip6_output.c

Modified: stable/7/sys/netinet6/ip6_output.c
==============================================================================
--- stable/7/sys/netinet6/ip6_output.c	Tue Oct 21 09:30:42 2008	(r184116)
+++ stable/7/sys/netinet6/ip6_output.c	Tue Oct 21 09:45:02 2008	(r184117)
@@ -2814,7 +2814,7 @@ ip6_setpktopts(struct mbuf *control, str
 	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;
 


More information about the svn-src-stable-7 mailing list