The branch, master has been updated
       via  0e2711b lib: Fix uninitialized read in msghdr_copy
      from  c620bf5 ctdb-daemon: Reset push_started flag once DB_PUSH_CONFIRM 
is done

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0e2711b2a0adeda6873f9c8161b9b01a56ae7098
Author: Jeremy Allison <[email protected]>
Date:   Wed Jun 8 14:34:20 2016 +0200

    lib: Fix uninitialized read in msghdr_copy
    
    Signed-off-by: Jeremy Allison <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>
    
    Autobuild-User(master): Volker Lendecke <[email protected]>
    Autobuild-Date(master): Wed Jun  8 18:34:27 CEST 2016 on sn-devel-144

-----------------------------------------------------------------------

Summary of changes:
 lib/util/msghdr.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/msghdr.c b/lib/util/msghdr.c
index 1aeadfc..0100b33 100644
--- a/lib/util/msghdr.c
+++ b/lib/util/msghdr.c
@@ -204,7 +204,14 @@ ssize_t msghdr_copy(struct msghdr_buf *msg, size_t msgsize,
        bufsize = (msgsize > offsetof(struct msghdr_buf, buf)) ?
                msgsize - offsetof(struct msghdr_buf, buf) : 0;
 
-       fd_len = msghdr_prep_fds(&msg->msg, msg->buf, bufsize, fds, num_fds);
+       if (msg != NULL) {
+               msg->msg = (struct msghdr) {};
+
+               fd_len = msghdr_prep_fds(&msg->msg, msg->buf, bufsize,
+                                        fds, num_fds);
+       } else {
+               fd_len = msghdr_prep_fds(NULL, NULL, bufsize, fds, num_fds);
+       }
 
        if (fd_len == -1) {
                return -1;


-- 
Samba Shared Repository

Reply via email to