{
char namebuf[MAXPATHLEN];
char newbuf[MAXPATHLEN];
+ char newbuftemp[sizeof(newbuf)];
snprintf(namebuf, sizeof(namebuf), "%s", isfname);
snprintf(newbuf, sizeof(newbuf), "%s", isfname);
* Replace the last element of the old path with newname.
*/
_removelast(newbuf);
- if (strcmp(newbuf, "/") != 0)
- snprintf(newbuf, sizeof(newbuf), "%s/", newbuf);
- snprintf(newbuf, sizeof(newbuf), "%s%s", newbuf, newname);
+ if (strcmp(newbuf, "/") != 0) {
+ snprintf(newbuftemp, sizeof(newbuftemp), "%s/", newbuf);
+ strcpy(newbuf, newbuftemp);
+ }
+ snprintf(newbuftemp, sizeof(newbuftemp), "%s%s", newbuf, newname);
+ strcpy(newbuf, newbuftemp);
_makedat_isfname(namebuf);
_makedat_isfname(newbuf);
{
char namebuf[MAXPATHLEN];
char newbuf[MAXPATHLEN];
+ char newbuftemp[MAXPATHLEN];
snprintf(namebuf, sizeof(namebuf), "%s", isfname);
snprintf(newbuf, sizeof(newbuf), "%s", isfname);
* Replace the last element of the old path with newname.
*/
_removelast(newbuf);
- if (strcmp(newbuf, "/") != 0)
- snprintf(newbuf, sizeof(newbuf), "%s/", newbuf);
- snprintf(newbuf, sizeof(newbuf), "%s%s", newbuf, newname);
+ if (strcmp(newbuf, "/") != 0) {
+ snprintf(newbuftemp, sizeof(newbuftemp), "%s/", newbuf);
+ strcpy(newbuf, newbuftemp);
+ }
+ snprintf(newbuftemp, sizeof(newbuftemp), "%s%s", newbuf, newname);
+ strcpy(newbuf, newbuftemp);
_makeind_isfname(namebuf);
_makeind_isfname(newbuf);
{
char namebuf[MAXPATHLEN];
char newbuf[MAXPATHLEN];
+ char newbuftemp[MAXPATHLEN];
snprintf(namebuf, sizeof(namebuf), "%s", isfname);
snprintf(newbuf, sizeof(newbuf), "%s", isfname);
* Replace the last element of the old path with newname.
*/
_removelast(newbuf);
- if (strcmp(newbuf, "/") != 0)
- snprintf(newbuf, sizeof(newbuf), "%s/", newbuf);
- snprintf(newbuf, sizeof(newbuf), "%s%s", newbuf, newname);
+ if (strcmp(newbuf, "/") != 0) {
+ snprintf(newbuftemp, sizeof(newbuftemp), "%s/", newbuf);
+ strcpy(newbuf, newbuftemp);
+ }
+ snprintf(newbuftemp, sizeof(newbuftemp), "%s%s", newbuf, newname);
+ strcpy(newbuf, newbuftemp);
_makevar_isfname(namebuf);
_makevar_isfname(newbuf);
char *bitmap = NULL;
char familyName [20]; /* FAMILY%d */
char bitmapName [MAXPATHLEN + 2];
+ char bitmapNameTemp [sizeof(bitmapName)];
XrmDatabase db;
char *resType;
{
ptr++;
*ptr = '\0';
- snprintf(bitmapName, sizeof(bitmapName), "%s%s", bitmapName, bitmap);
+ snprintf(bitmapNameTemp, sizeof(bitmapNameTemp), "%s%s", bitmapName, bitmap);
+ strcpy(bitmapName, bitmapNameTemp);
bitmap = bitmapName;
}
else
int doGen = 0;
char tmpVolume [MAXPATHLEN + 2];
+ char tmpVolumeTemp[sizeof(tmpVolume)];
char tmpVolume2 [MAXPATHLEN + 2];
char tmpTopic [MAXPATHLEN + 2];
char tmpHeader [MAXPATHLEN + 2];
char headerName [MAXPATHLEN + 2];
char baseName [MAXPATHLEN + 2];
+ char baseNameTemp[sizeof(baseName)];
char tempName [MAXPATHLEN + 2];
char **next;
char *charSet;
myName, errno);
exit (1);
}
- snprintf(baseName, sizeof(baseName), "%s/%s", baseName, App_args.dir);
+ snprintf(baseNameTemp, sizeof(baseNameTemp), "%s/%s", baseName, App_args.dir);
+ strcpy(baseName, baseNameTemp);
}
else
snprintf(baseName, sizeof(baseName), "%s", App_args.dir);
}
snprintf(tmpVolume, sizeof(tmpVolume), "%s", ptr);
- if (tmpVolume[strlen (tmpVolume) - 1] != '/')
- snprintf(tmpVolume, sizeof(tmpVolume), "%s", SlashString);
+ if (tmpVolume[strlen (tmpVolume) - 1] != '/') {
+ snprintf(tmpVolumeTemp, sizeof(tmpVolumeTemp), "%s%s", tmpVolume, SlashString);
+ strcpy(tmpVolume, tmpVolumeTemp);
+ }
free (ptr);
/*
* get temporary files for the volume and topic file.
*/
- snprintf(tmpVolume, sizeof(tmpVolume), "%s%s", tmpVolume, App_args.file);
+ snprintf(tmpVolumeTemp, sizeof(tmpVolumeTemp), "%s%s", tmpVolume, App_args.file);
+ strcpy(tmpVolume, tmpVolumeTemp);
(void) strcpy (tmpHeader, tmpVolume);
(void) strcpy (tmpTopic, tmpVolume);
- snprintf(tmpVolume, sizeof(tmpVolume), "%s%s", tmpVolume, Ext_Hv);
+ snprintf(tmpVolumeTemp, sizeof(tmpVolumeTemp), "%s%s", tmpVolume, Ext_Hv);
+ strcpy(tmpVolume, tmpVolumeTemp);
(void) strcat (tmpHeader, "00.ht");
(void) strcat (tmpTopic , "01.ht");
int (*stricmp)(const char *,const char *);
char *name;
char name_prefix[RSRCSPECLEN];
+ char name_prefix_temp[sizeof(name_prefix)];
char class_prefix[RSRCSPECLEN];
+ char class_prefix_temp[sizeof(class_prefix)];
char resource_name[RSRCSPECLEN];
char resource_class[RSRCSPECLEN];
char *str_type[20];
else name = EMPTY_STR;
if (name[0] != EOS)
{
- snprintf(name_prefix, sizeof(name_prefix), "%s%s%s", name_prefix, DOT_STR, name); /* e.g. dthelpprint.printer.<name> */
- snprintf(class_prefix, sizeof(class_prefix), "%s%s%s", class_prefix, DOT_STR, name); /* e.g. Dthelpprint.Printer.<name> */
+ snprintf(name_prefix_temp, sizeof(name_prefix_temp), "%s%s%s", name_prefix, DOT_STR, name); /* e.g. dthelpprint.printer.<name> */
+ strcpy(name_prefix, name_prefix_temp);
+ snprintf(class_prefix_temp, sizeof(class_prefix_temp), "%s%s%s", class_prefix, DOT_STR, name); /* e.g. Dthelpprint.Printer.<name> */
+ strcpy(class_prefix, class_prefix_temp);
}
/**************************/
_DtXlateDb myDb = NULL;
char myPlatform[_DtPLATFORM_MAX_LEN+1];
char myLocale[256]; /* arbitrarily large */
+char myLocaleTemp[sizeof(myLocale)]; /* non-arbitrarily the same */
char *locale;
char *lang;
char *charset;
snprintf(myLocale, sizeof(myLocale), "%s", pLang);
if (*pCharset)
{
- snprintf(myLocale, sizeof(myLocale), "%s.%s", myLocale, pCharset);
+ snprintf(myLocaleTemp, sizeof(myLocaleTemp), "%s.%s", myLocale, pCharset);
+ strcpy(myLocale, myLocaleTemp);
}
if ((_DtLcxOpenAllDbs(&myDb) != 0) ||
{
FILE *old, *new;
char home_name[1024], backup_name[1024], new_name[1024];
+ char home_name_temp[sizeof(home_name)];
char *name;
char *home;
char *envname = 0;
lockStatus = LOCK_ERROR;
if (home) {
snprintf(home_name, sizeof(home_name), "%s", home);
- if (home[strlen(home) - 1] != '/')
- snprintf(home_name, sizeof(home_name), "%s/", home_name);
- snprintf(home_name, sizeof(home_name), "%s.Xauthority", home_name);
+ if (home[strlen(home) - 1] != '/') {
+ snprintf(home_name_temp, sizeof(home_name_temp), "%s/", home_name);
+ strcpy(home_name, home_name_temp);
+ }
+ snprintf(home_name_temp, sizeof(home_name_temp), "%s.Xauthority", home_name);
+ strcpy(home_name, home_name_temp);
Debug ("XauLockAuth %s\n", home_name);
lockStatus = XauLockAuth (home_name, 1, 2, 10);
Debug ("Lock is %d\n", lockStatus);
char *home;
Xauth **auths, *entry;
char name[1024], new_name[1024];
+ char name_temp[sizeof(name)];
int lockStatus;
FILE *old, *new;
struct stat statb;
return;
Debug ("RemoveUserAuthorization\n");
snprintf(name, sizeof(name), "%s", home);
- if (home[strlen(home) - 1] != '/')
- snprintf(name, sizeof(name), "%s/", name);
- snprintf(name, sizeof(name), "%s.Xauthority", name);
+ if (home[strlen(home) - 1] != '/') {
+ snprintf(name_temp, sizeof(name_temp), "%s/", name);
+ strcpy(name, name_temp);
+ }
+ snprintf(name_temp, sizeof(name_temp), "%s.Xauthority", name);
+ strcpy(name, name_temp);
Debug ("XauLockAuth %s\n", name);
lockStatus = XauLockAuth (name, 1, 2, 10);
Debug ("Lock is %d\n", lockStatus);