From 4c98e3f9600278f677958a2414ead21d365ac7d6 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 22 Apr 2017 22:26:56 +0200 Subject: [PATCH] Fix pipe and unix socket iovec support. --- kernel/pipe.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/pipe.cpp b/kernel/pipe.cpp index 2f3dcb8c..ea1e7e3a 100644 --- a/kernel/pipe.cpp +++ b/kernel/pipe.cpp @@ -183,7 +183,7 @@ ssize_t PipeChannel::recvmsg(ioctx_t* ctx, struct msghdr* msg_ptr, int flags) struct iovec* iov = new struct iovec[msg.msg_iovlen]; if ( !iov ) return -1; - if ( !ctx->copy_from_src(&iov, msg.msg_iov, iov_size) ) + if ( !ctx->copy_from_src(iov, msg.msg_iov, iov_size) ) return delete[] iov, -1; msg.msg_iov = iov; size_t result = recvmsg_internal(ctx, &msg, flags); @@ -317,7 +317,7 @@ ssize_t PipeChannel::sendmsg(ioctx_t* ctx, const struct msghdr* msg_ptr, struct iovec* iov = new struct iovec[msg.msg_iovlen]; if ( !iov ) return -1; - if ( !ctx->copy_from_src(&iov, msg.msg_iov, iov_size) ) + if ( !ctx->copy_from_src(iov, msg.msg_iov, iov_size) ) return delete[] iov, -1; msg.msg_iov = iov; size_t result = sendmsg_internal(ctx, &msg, flags);