diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-12-27 12:12:20 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2017-12-29 02:31:26 +0100 |
commit | 604e09686f1f7227cf61e67754d94006c90d29c4 (patch) | |
tree | 2c405b5e6b8aa1c32de4caa3e8cb03abab4ee9b7 /nxcomp/src/Loop.cpp | |
parent | 2d44051aad601e074790eaf482ef09090131ca5d (diff) | |
download | nx-libs-604e09686f1f7227cf61e67754d94006c90d29c4.tar.gz nx-libs-604e09686f1f7227cf61e67754d94006c90d29c4.tar.bz2 nx-libs-604e09686f1f7227cf61e67754d94006c90d29c4.zip |
Loop.cpp: Fix memset (size was 0)
(partially) fixes ArcticaProject/nx-libs#612
Diffstat (limited to 'nxcomp/src/Loop.cpp')
-rw-r--r-- | nxcomp/src/Loop.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp index d458d65a3..a4c7a95e7 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; |