aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nxcomp/Loop.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp
index 2f7671cc6..7e77bc2a9 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 '"
@@ -9367,10 +9367,10 @@ int ParseCommandLineOptions(int argc, const char **argv)
// command line at the connecting side.
//
- char *cHost;
- long cPort;
+ char cHost[DEFAULT_STRING_LENGTH] = { '\0' };
+ long cPort = 0;
- if (connectSocket.getTCPHostAndPort(&cHost, &cPort) && (ParseHostOption(nextArg, cHost, cPort) > 0))
+ if (ParseHostOption(nextArg, cHost, cPort) > 0)
{
//
// Assume port is at a proxied display offset.