saveFile = PS_DEFAULT_RESOURCE_FILE;
if (! DtSessionSavePath(topLevelWithWmCommand, &savePath, &saveFile))
{
- sprintf(
- buffer, "%s/%s/%s",
+ snprintf(
+ buffer, sizeof(buffer), "%s/%s/%s",
getenv(PS_HOME_ENV_VARIABLE),
DtPERSONAL_TMP_DIRECTORY,
PS_DEFAULT_RESOURCE_FILE);
if (pSetup == NULL ||
pSetup->dtprintSetup == NULL ||
pSetup->widgets == NULL)
- return;
+ return 0;
pOption = &pSetup->options;
frame = pSetup->widgets->marginFrame;
filename = pSetup->docName;
else
filename++;
- sprintf(path, "%s/%s.ps", dirname, filename);
+ snprintf(path, sizeof(path), "%s/%s.ps", dirname, filename);
XtVaSetValues(pSetup->dtprintSetup, DtNfileName, path, NULL);
}
}