From 85f5fdfd28dd7ba024586a62cc7cbba2d1b9e027 Mon Sep 17 00:00:00 2001 From: Vadim Troshchinskiy Date: Fri, 7 Oct 2016 13:58:57 +0200 Subject: 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. --- nxcomp/Loop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 '" -- cgit v1.2.3