[X2Go-Commits] [nx-libs] 09/29: Font.c: make nxagentGetFontServerPath more readable
git-admin at x2go.org
git-admin at x2go.org
Sun Jan 7 01:30:58 CET 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit 9a6b90c316e6ad2a5180ee9be4b0c9c7139d86b7
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Fri Dec 8 00:30:32 2017 +0100
Font.c: make nxagentGetFontServerPath more readable
---
nx-X11/programs/Xserver/hw/nxagent/Font.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c
index 0a9f6e3..39c3b31 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Font.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c
@@ -1411,11 +1411,12 @@ static Bool nxagentGetFontServerPath(char * fontServerPath)
if (NXGetFontParameters(nxagentDisplay, sizeof(path), path) == True)
{
- if (*path != '\0')
- {
- strncpy(fontServerPath, path + 1, *path);
+ unsigned int len = *path;
- fontServerPath[*path] = '\0';
+ if (len)
+ {
+ strncpy(fontServerPath, path + 1, len);
+ fontServerPath[len] = '\0';
#ifdef TEST
fprintf(stderr, "nxagentGetFontServerPath: Got path [%s].\n",
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list