aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Display.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Display.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index b78530e37..31efab8c3 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -1873,8 +1873,7 @@ static FILE *nxagentLookForIconFile(char *iconName, const char *permission,
/* append slash and icon name */
if (strlen(singlePath) + strlen(iconName) + 1 < sizeof(singlePath))
{
- strncat(singlePath, slash, 1);
- strcat(singlePath, iconName);
+ snprintf(singlePath + strlen(singlePath), sizeof(singlePath), "%s%s", slash, iconName);
if ((fptr = fopen(singlePath, permission)) != NULL)
{