summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2004-08-23 12:41:29 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2004-08-23 12:41:29 +0000
commit72261b9f61461c074b0617d935a196efc63cb29e (patch)
tree6f79c400df57d04c123588155a72c157c74bdd96
parent9777e82e42b03458ab73e124ce56fac8495467c5 (diff)
Notes
-rw-r--r--sys/compat/linux/linux_socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index fdba0996ce69a..47cf5d6f22fd1 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);
}