1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtfile/SharedProcs: CID 88158,88337,89104,89118

This commit is contained in:
Jon Trulson 2018-04-11 12:46:57 -06:00
parent dd03c9cbf7
commit d30719f3a2

View file

@ -393,7 +393,7 @@ _DtLoadSubdialogArray (
{
int i;
char number[10];
static char number[10];
/* Load sub-dialogs */
nameList[nameCount] = number;
@ -404,7 +404,7 @@ _DtLoadSubdialogArray (
for (i = 0; i < dialogCount; i++)
{
sprintf(number, "%d", firstId);
snprintf(number, 10, "%d", firstId);
(*dialogArray)[i] = _DtGetResourceDialogData(dialogId, dataBase, nameList);
firstId++;
}
@ -423,14 +423,14 @@ _DtSaveSubdialogArray (
{
int i;
char number[10];
static char number[10];
nameList[nameCount] = number;
nameList[nameCount + 1] = NULL;
for (i = 0; i < dialogCount; i++)
{
sprintf(number, "%d", firstId);
snprintf(number, 10, "%d", firstId);
_DtWriteDialogData(dialogArray[i], fd, nameList);
firstId++;
}
@ -1374,10 +1374,12 @@ RetrieveAndUseNameTemplateInfo(
sprintf(buffer_name, name_template, template_input);
DtDtsFreeAttributeValue(name_template);
XtFree(template_input);
XtFree(name_template);
return(buffer_name);
}
else
{
XtFree(name_template);
return(template_input);
}
}
@ -1628,7 +1630,7 @@ _DtPathFromInput(
/* Resolve, if there're any, environment variables */
{
FILE *pfp;
FILE *pfp = NULL;
char command[MAXPATHLEN];
memset(command, 0, sizeof(command));
@ -1665,8 +1667,14 @@ _DtPathFromInput(
XtFree(path);
path = XtNewString(command);
pclose(pfp);
pfp = NULL;
}
}
if (pfp)
{
pclose(pfp);
pfp = NULL;
}
}
/* Resolve '~' -- new memory is allocated, old memory is freed */