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 */
|
||||
char *CloString = NULL;
|
||||
char dsm[2048];
|
||||
char dsmtemp[sizeof(dsm)];
|
||||
Boolean gotItAll;
|
||||
gotItAll = True;
|
||||
if(gotItAll)
|
||||
|
@ -404,11 +405,13 @@ void InitBuiltinSystemMenu(void)
|
|||
#ifdef WSM
|
||||
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);
|
||||
strcpy(dsm, dsmtemp);
|
||||
}
|
||||
#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 =
|
||||
(char *)XtMalloc ((unsigned int) (strlen(dsm) + 1))) == NULL)
|
||||
|
|
Loading…
Reference in a new issue