aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Args.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-05 23:34:09 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-05 23:34:09 +0100
commit057ce728fcb43e6b91a54f98f6f6d9ed8fe680a6 (patch)
treef8fbbf51720409b25fe23e5bdbe1b1d7cafde918 /nx-X11/programs/Xserver/hw/nxagent/Args.c
parent46ef20bdb97bc134bb855f8604828ec314716a32 (diff)
parent80b6d6b9cc456a943e307ec069c0c395c6ba650e (diff)
downloadnx-libs-057ce728fcb43e6b91a54f98f6f6d9ed8fe680a6.tar.gz
nx-libs-057ce728fcb43e6b91a54f98f6f6d9ed8fe680a6.tar.bz2
nx-libs-057ce728fcb43e6b91a54f98f6f6d9ed8fe680a6.zip
Merge branch 'uli42-pr/strings_fixes' into 3.6.x
Attributes GH PR #884: https://github.com/ArcticaProject/nx-libs/pull/884
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Args.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index 339c6d85b..0336be822 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -1296,7 +1296,17 @@ static void nxagentParseSingleOption(char *name, char *value)
}
else if (strcmp(name, "clients") == 0)
{
- snprintf(nxagentClientsLogName, NXAGENTCLIENTSLOGNAMELENGTH, "%s", value);
+ char *new = strdup(value);
+ if (new)
+ {
+ SAFE_free(nxagentClientsLogName);
+ nxagentClientsLogName = new;
+ }
+ else
+ {
+ fprintf(stderr, "Warning: Ignoring option [%s] because of memory problems\n",
+ validateString(name));
+ }
return;
}
else if (strcmp(name, "client") == 0)