[X2Go-Commits] [nx-libs] 01/19: Loop.cpp: Fix memset (size was 0)

git-admin at x2go.org git-admin at x2go.org
Sat Dec 30 03:35:15 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 604e09686f1f7227cf61e67754d94006c90d29c4
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Wed Dec 27 12:12:20 2017 +0100

    Loop.cpp: Fix memset (size was 0)
    
    (partially) fixes ArcticaProject/nx-libs#612
---
 nxcomp/src/Loop.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp
index d458d65..a4c7a95 100644
--- a/nxcomp/src/Loop.cpp
+++ b/nxcomp/src/Loop.cpp
@@ -3936,7 +3936,7 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
     unixSocketName[0] = '\0';
 
     sockaddr_un *xServerAddrABSTRACT = new sockaddr_un;
-    memset(xServerAddrABSTRACT, 0, addr_length);
+    memset(xServerAddrABSTRACT, 0, sizeof(struct sockaddr_un));
     xServerAddrABSTRACT -> sun_family = AF_UNIX;
     memcpy(xServerAddrABSTRACT -> sun_path, unixSocketName, len+1);
     addr_length = len +3;

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list