The branch, master has been updated
       via  84aea20 ctdb: Fix CID 1327222 Copy into fixed size buffer
       via  04b5e9c ctdb: Fix CID 1361817 Dereference after null check
      from  404acae dbwrap_ctdb: Remove get_my_vnn dependency

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


- Log -----------------------------------------------------------------
commit 84aea20f37f7a59c13eb0dcb63e26a389fcc47ee
Author: Volker Lendecke <[email protected]>
Date:   Tue May 17 11:39:38 2016 +0200

    ctdb: Fix CID 1327222 Copy into fixed size buffer
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Uri Simchoni <[email protected]>
    
    Autobuild-User(master): Uri Simchoni <[email protected]>
    Autobuild-Date(master): Tue May 17 21:21:30 CEST 2016 on sn-devel-144

commit 04b5e9c9a629add210cafd802c9f4d584d4925b8
Author: Volker Lendecke <[email protected]>
Date:   Tue May 17 11:36:44 2016 +0200

    ctdb: Fix CID 1361817 Dereference after null check
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Uri Simchoni <[email protected]>

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

Summary of changes:
 ctdb/tests/src/fake_ctdbd.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/tests/src/fake_ctdbd.c b/ctdb/tests/src/fake_ctdbd.c
index 0d08313..462ecb7 100644
--- a/ctdb/tests/src/fake_ctdbd.c
+++ b/ctdb/tests/src/fake_ctdbd.c
@@ -2097,11 +2097,17 @@ static bool server_recv(struct tevent_req *req, int 
*perr)
 static int socket_init(const char *sockpath)
 {
        struct sockaddr_un addr;
+       size_t len;
        int ret, fd;
 
        memset(&addr, 0, sizeof(addr));
        addr.sun_family = AF_UNIX;
-       strcpy(addr.sun_path, sockpath);
+
+       len = strlcpy(addr.sun_path, sockpath, sizeof(addr.sun_path));
+       if (len >= sizeof(addr.sun_path)) {
+               fprintf(stderr, "path too long: %s\n", sockpath);
+               return -1;
+       }
 
        fd = socket(AF_UNIX, SOCK_STREAM, 0);
        if (fd == -1) {
@@ -2172,6 +2178,7 @@ static void start_server(TALLOC_CTX *mem_ctx, struct 
tevent_context *ev,
        req = server_send(mem_ctx, ev, ctdb, fd);
        if (req == NULL) {
                fprintf(stderr, "Memory error\n");
+               exit(1);
        }
 
        len = write(pfd, &ret, sizeof(ret));


-- 
Samba Shared Repository

Reply via email to