File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2777,11 +2777,10 @@ f! {
27772777 return :: CMSG_FIRSTHDR ( mhdr) ;
27782778 } ;
27792779 let cmsg_len = ( * cmsg) . cmsg_len as usize ;
2780- let next = cmsg as usize + __DARWIN_ALIGN32( cmsg_len as usize )
2781- + __DARWIN_ALIGN32( mem:: size_of:: <:: cmsghdr>( ) ) ;
2780+ let next = cmsg as usize + __DARWIN_ALIGN32( cmsg_len as usize ) ;
27822781 let max = ( * mhdr) . msg_control as usize
27832782 + ( * mhdr) . msg_controllen as usize ;
2784- if next > max {
2783+ if next + __DARWIN_ALIGN32 ( mem :: size_of :: < :: cmsghdr> ( ) ) > max {
27852784 0 as * mut :: cmsghdr
27862785 } else {
27872786 next as * mut :: cmsghdr
@@ -2800,7 +2799,7 @@ f! {
28002799 }
28012800
28022801 pub fn CMSG_LEN ( length: :: c_uint) -> :: c_uint {
2803- __DARWIN_ALIGN32( mem:: size_of:: <:: cmsghdr>( ) + length as usize )
2802+ ( __DARWIN_ALIGN32( mem:: size_of:: <:: cmsghdr>( ) ) + length as usize )
28042803 as :: c_uint
28052804 }
28062805
You can’t perform that action at this time.
0 commit comments