aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/Loop.cpp
diff options
context:
space:
mode:
authorVadim Troshchinskiy <vtroshchinskiy@qindel.com>2016-10-07 13:58:57 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-07 21:51:30 +0200
commit85f5fdfd28dd7ba024586a62cc7cbba2d1b9e027 (patch)
tree375f453940c563e21d513b38746fb0f416fe87d8 /nxcomp/Loop.cpp
parent3039a34cbd8716766391fe7de5ea002f643bf143 (diff)
downloadnx-libs-85f5fdfd28dd7ba024586a62cc7cbba2d1b9e027.tar.gz
nx-libs-85f5fdfd28dd7ba024586a62cc7cbba2d1b9e027.tar.bz2
nx-libs-85f5fdfd28dd7ba024586a62cc7cbba2d1b9e027.zip
Check if unixPath is NULL before accessing it; this fixes crashing of nxagent when TEST is enabled.
Fixes ArcticaProject/nx-libs#217. Closes ArcticaProject/nx-libs#218.
Diffstat (limited to 'nxcomp/Loop.cpp')
-rw-r--r--nxcomp/Loop.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp
index 2f7671cc6..a690042d2 100644
--- a/nxcomp/Loop.cpp
+++ b/nxcomp/Loop.cpp
@@ -7255,7 +7255,7 @@ int ConnectToRemote(ChannelEndPoint &socketAddress)
ESET(reason);
#ifdef TEST
- if (unixPath[0] != '\0' )
+ if (unixPath && unixPath[0] != '\0' )
{
*logofs << "Loop: Connection to Unix socket file '"
<< unixPath << "' failed with error '"