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;
 
_______________________________________________
[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