summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2021-02-10 10:45:11 +0100
committerAndreas Schneider <asn@samba.org>2021-02-10 10:50:17 +0100
commitd610c8d5b32db5c3cc6e57b11d1d2e1505975832 (patch)
tree2252f5e559b0dde33a7c4d83518cec3fbfdea5de /src
parentdb594f106d9737e0415a268439fc9003bb636473 (diff)
downloadsocket_wrapper-d610c8d5b32db5c3cc6e57b11d1d2e1505975832.tar.gz
socket_wrapper-d610c8d5b32db5c3cc6e57b11d1d2e1505975832.tar.xz
socket_wrapper-d610c8d5b32db5c3cc6e57b11d1d2e1505975832.zip
swrap: don't read the callers msg_control buffer in swrap_recvmsg_before_unix()
For recvmsg() msg_control is a write only buffer, that is filled by the kernel, but the kernel won't read from that buffer. So we shouldn't read from (copy) it either. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'src')
-rw-r--r--src/socket_wrapper.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 59fb07d..a950a0a 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -5993,7 +5993,6 @@ static int swrap_recvmsg_before_unix(struct msghdr *msg_in,
if (cm_data == NULL) {
return -1;
}
- memcpy(cm_data, msg_in->msg_control, msg_in->msg_controllen);
msg_tmp->msg_controllen = cm_data_space;
msg_tmp->msg_control = cm_data;