diff options
author | Volker Lendecke <vl@samba.org> | 2015-03-03 15:48:46 +0100 |
---|---|---|
committer | Ralph Böhme <slow@samba.org> | 2015-03-03 17:34:38 +0100 |
commit | ddb84ef2d39524149ffe74d752993ca93547b9be (patch) | |
tree | f267d4fa74ccdd349947cc7833a97bfa98ab7429 | |
parent | 7be3a5f92ddbb378a3c80e455cb7403f7861efa1 (diff) | |
download | samba-ddb84ef2d39524149ffe74d752993ca93547b9be.tar.gz samba-ddb84ef2d39524149ffe74d752993ca93547b9be.tar.xz samba-ddb84ef2d39524149ffe74d752993ca93547b9be.zip |
aio_fork: Fix CID 1273291 Uninitialized scalar variable
The previous code left msg.msg_flags uninitialized
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r-- | source3/modules/vfs_aio_fork.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c index bf29dd1e01..06f38c2a69 100644 --- a/source3/modules/vfs_aio_fork.c +++ b/source3/modules/vfs_aio_fork.c @@ -203,15 +203,13 @@ static ssize_t read_fd(int fd, void *ptr, size_t nbytes, int *recvfd) static ssize_t write_fd(int fd, void *ptr, size_t nbytes, int sendfd) { - struct msghdr msg; + struct msghdr msg = {0}; size_t bufsize = msghdr_prep_fds(NULL, NULL, 0, &sendfd, 1); uint8_t buf[bufsize]; struct iovec iov; ssize_t sent; msghdr_prep_fds(&msg, buf, bufsize, &sendfd, 1); - msg.msg_name = NULL; - msg.msg_namelen = 0; iov.iov_base = (void *)ptr; iov.iov_len = nbytes; |