summaryrefslogtreecommitdiff
path: root/xsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xsm.c')
-rw-r--r--xsm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xsm.c b/xsm.c
index 15304ba..4a95bd2 100644
--- a/xsm.c
+++ b/xsm.c
@@ -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 */