File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2777,11 +2777,10 @@ f! {
2777
2777
return :: CMSG_FIRSTHDR ( mhdr) ;
2778
2778
} ;
2779
2779
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 ) ;
2782
2781
let max = ( * mhdr) . msg_control as usize
2783
2782
+ ( * mhdr) . msg_controllen as usize ;
2784
- if next > max {
2783
+ if next + __DARWIN_ALIGN32 ( mem :: size_of :: < :: cmsghdr> ( ) ) > max {
2785
2784
0 as * mut :: cmsghdr
2786
2785
} else {
2787
2786
next as * mut :: cmsghdr
@@ -2800,7 +2799,7 @@ f! {
2800
2799
}
2801
2800
2802
2801
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 )
2804
2803
as :: c_uint
2805
2804
}
2806
2805
You can’t perform that action at this time.
0 commit comments