mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtwm: Fix window menus caused by using destination as param to snprintf
This commit is contained in:
parent
9b4b82c1f0
commit
b410e644c0
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue