We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c9fb51b + 724d1a3 commit 9b6e9afCopy full SHA for 9b6e9af
src/unix/linux_like/android/mod.rs
@@ -2289,6 +2289,9 @@ pub const PF_VSOCK: ::c_int = AF_VSOCK;
2289
f! {
2290
pub fn CMSG_NXTHDR(mhdr: *const msghdr,
2291
cmsg: *const cmsghdr) -> *mut cmsghdr {
2292
+ if ((*cmsg).cmsg_len as usize) < ::mem::size_of::<cmsghdr>() {
2293
+ return 0 as *mut cmsghdr;
2294
+ };
2295
let next = (cmsg as usize
2296
+ super::CMSG_ALIGN((*cmsg).cmsg_len as usize))
2297
as *mut cmsghdr;
0 commit comments