diff options
Diffstat (limited to 'sys/compat/freebsd32')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index e219c73..2515fe9 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1009,7 +1009,7 @@ freebsd32_recvmsg(td, uap) msg.msg_iov = iov; controlp = (msg.msg_control != NULL) ? &control : NULL; - error = kern_recvit(td, uap->s, &msg, NULL, UIO_USERSPACE, controlp); + error = kern_recvit(td, uap->s, &msg, UIO_USERSPACE, controlp); if (error == 0) { msg.msg_iov = uiov; @@ -1149,8 +1149,10 @@ freebsd32_recvfrom(struct thread *td, aiov.iov_len = uap->len; msg.msg_control = NULL; msg.msg_flags = uap->flags; - error = kern_recvit(td, uap->s, &msg, PTRIN(uap->fromlenaddr), - UIO_USERSPACE, NULL); + error = kern_recvit(td, uap->s, &msg, UIO_USERSPACE, NULL); + if (error == 0 && uap->fromlenaddr) + error = copyout(&msg.msg_namelen, PTRIN(uap->fromlenaddr), + sizeof (msg.msg_namelen)); return (error); } |