Commit a2cddcaf authored by HardenedBSD Sync Service's avatar HardenedBSD Sync Service
Browse files

Merge remote-tracking branch 'freebsd/stable/12' into hardened/12-stable/master

parents c0111086 0d2b7738
......@@ -1192,28 +1192,18 @@ freebsd32_copy_msg_out(struct msghdr *msg, struct mbuf *control)
}
int
freebsd32_recvmsg(td, uap)
struct thread *td;
struct freebsd32_recvmsg_args /* {
int s;
struct msghdr32 *msg;
int flags;
} */ *uap;
freebsd32_recvmsg(struct thread *td, struct freebsd32_recvmsg_args *uap)
{
struct msghdr msg;
struct msghdr32 m32;
struct iovec *uiov, *iov;
struct mbuf *control = NULL;
struct mbuf **controlp;
int error;
error = copyin(uap->msg, &m32, sizeof(m32));
if (error)
return (error);
error = freebsd32_copyinmsghdr(uap->msg, &msg);
if (error)
return (error);
error = freebsd32_copyiniov(PTRIN(m32.msg_iov), m32.msg_iovlen, &iov,
error = freebsd32_copyiniov((void *)msg.msg_iov, msg.msg_iovlen, &iov,
EMSGSIZE);
if (error)
return (error);
......@@ -1343,23 +1333,18 @@ freebsd32_copyin_control(struct mbuf **mp, caddr_t buf, u_int buflen)
}
int
freebsd32_sendmsg(struct thread *td,
struct freebsd32_sendmsg_args *uap)
freebsd32_sendmsg(struct thread *td, struct freebsd32_sendmsg_args *uap)
{
struct msghdr msg;
struct msghdr32 m32;
struct iovec *iov;
struct mbuf *control = NULL;
struct sockaddr *to = NULL;
int error;
error = copyin(uap->msg, &m32, sizeof(m32));
if (error)
return (error);
error = freebsd32_copyinmsghdr(uap->msg, &msg);
if (error)
return (error);
error = freebsd32_copyiniov(PTRIN(m32.msg_iov), m32.msg_iovlen, &iov,
error = freebsd32_copyiniov((void *)msg.msg_iov, msg.msg_iovlen, &iov,
EMSGSIZE);
if (error)
return (error);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment