summaryrefslogtreecommitdiff
path: root/save.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-11-26 13:21:18 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-11-26 13:21:18 -0800
commit6f4560e2ad81736127d2d3544415a05d41e8a2a7 (patch)
tree6c53b2585d1081cf9296c09cd22acee1e9ac9a4f /save.c
parentfab9dcb15024996ac3a4f94d65ba73f484820534 (diff)
Use snprintf, strdup & remove instead of sprintf, malloc/strcpy & unlink
Diffstat (limited to 'save.c')
-rw-r--r--save.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/save.c b/save.c
index 5d06877..229a6d7 100644
--- a/save.c
+++ b/save.c
@@ -147,7 +147,7 @@ MakeCurrentSession(String new_name, Bool name_changed)
LockSession (session_name, True);
- sprintf (title, "xsm: %s", session_name);
+ snprintf (title, sizeof(title), "xsm: %s", session_name);
XtVaSetValues (topLevel,
XtNtitle, title,
@@ -413,7 +413,7 @@ SaveOkXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
name_locked = True;
- sprintf (label, "Another session by the name '%s' is active.\nChoose another name for the session.", name);
+ snprintf (label, sizeof(label), "Another session by the name '%s' is active.\nChoose another name for the session.", name);
XtUnmanageChild (nameInUseOverwriteButton);