diff options
-rw-r--r-- | sys/compat/linux/linux_socket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index fdba099..47cf5d6 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -1011,7 +1011,8 @@ linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args) if (error) return (error); - if (bsd_args.msg->msg_control != NULL) { + if (bsd_args.msg->msg_control != NULL && + bsd_args.msg->msg_controllen > 0) { cmsg = (struct cmsghdr*)bsd_args.msg->msg_control; cmsg->cmsg_level = bsd_to_linux_sockopt_level(cmsg->cmsg_level); } |