dtwm: Fix window menus caused by using destination as param to snprintf
This commit is contained in:
@@ -202,6 +202,7 @@ void InitBuiltinSystemMenu(void)
|
|||||||
#endif /* WSM */
|
#endif /* WSM */
|
||||||
char *CloString = NULL;
|
char *CloString = NULL;
|
||||||
char dsm[2048];
|
char dsm[2048];
|
||||||
|
char dsmtemp[sizeof(dsm)];
|
||||||
Boolean gotItAll;
|
Boolean gotItAll;
|
||||||
gotItAll = True;
|
gotItAll = True;
|
||||||
if(gotItAll)
|
if(gotItAll)
|
||||||
@@ -404,11 +405,13 @@ void InitBuiltinSystemMenu(void)
|
|||||||
#ifdef WSM
|
#ifdef WSM
|
||||||
if (DtwmBehavior)
|
if (DtwmBehavior)
|
||||||
{
|
{
|
||||||
snprintf(dsm, sizeof(dsm), "%s%s\n%s\n%s\n no-label f.separator\n",
|
snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n%s\n%s\n no-label f.separator\n",
|
||||||
dsm, OcpString, OcaString, RemString);
|
dsm, OcpString, OcaString, RemString);
|
||||||
|
strcpy(dsm, dsmtemp);
|
||||||
}
|
}
|
||||||
#endif /* WSM */
|
#endif /* WSM */
|
||||||
snprintf(dsm, sizeof(dsm), "%s%s\n}", dsm, CloString);
|
snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n}", dsm, CloString);
|
||||||
|
strcpy(dsm, dsmtemp);
|
||||||
|
|
||||||
if ((builtinSystemMenu =
|
if ((builtinSystemMenu =
|
||||||
(char *)XtMalloc ((unsigned int) (strlen(dsm) + 1))) == NULL)
|
(char *)XtMalloc ((unsigned int) (strlen(dsm) + 1))) == NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user