Author: bz
Date: Wed Oct 22 14:56:15 2008
New Revision: 184162
URL: http://svn.freebsd.org/changeset/base/184162

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

Modified: stable/6/sys/netinet6/ip6_output.c
==============================================================================
--- stable/6/sys/netinet6/ip6_output.c  Wed Oct 22 14:45:30 2008        
(r184161)
+++ stable/6/sys/netinet6/ip6_output.c  Wed Oct 22 14:56:15 2008        
(r184162)
@@ -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;
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to