dtsession: A few extra snprintf's for buffer safety

This commit is contained in:
Peter Howkins
2018-04-29 02:11:23 +01:00
parent e14e74231c
commit f2c6a48d72
3 changed files with 8 additions and 8 deletions

View File

@@ -3512,7 +3512,7 @@ StartClient(
{
int slen = strlen(tstr) + 1;
defaultCwd = XtCalloc(1, slen);
strncpy(defaultCwd, tstr, slen - 1);
snprintf(defaultCwd, slen, "%s", tstr);
}
else
defaultCwd = getcwd (NULL, MAXPATHLEN + 1);