diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-11-26 13:21:18 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-11-26 13:21:18 -0800 |
commit | 6f4560e2ad81736127d2d3544415a05d41e8a2a7 (patch) | |
tree | 6c53b2585d1081cf9296c09cd22acee1e9ac9a4f /xsm.c | |
parent | fab9dcb15024996ac3a4f94d65ba73f484820534 (diff) |
Use snprintf, strdup & remove instead of sprintf, malloc/strcpy & unlink
Diffstat (limited to 'xsm.c')
-rw-r--r-- | xsm.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -358,7 +358,8 @@ SetWM_DELETE_WINDOW(Widget widget, String delAction) { char translation[64]; - sprintf (translation, "<Message>WM_PROTOCOLS: %s", delAction); + snprintf (translation, sizeof(translation), + "<Message>WM_PROTOCOLS: %s", delAction); XtOverrideTranslations (widget, XtParseTranslationTable (translation)); XSetWMProtocols (XtDisplay(widget), XtWindow (widget), @@ -495,7 +496,7 @@ StartSession(char *name, Bool use_default) * Set the main window's title to the session name. */ - sprintf (title, "xsm: %s", name); + snprintf (title, sizeof(title), "xsm: %s", name); XtVaSetValues (topLevel, XtNtitle, title, /* session name */ |