summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-01-13 00:11:52 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-01-20 23:29:28 -0800
commit7940a487162c5acb55417f0abafe70043bcc679e (patch)
tree28dfb4618b5c0f889c17d256f86c8bac692f2fcd
parentd5d409ac7b5792f3962dbe8a7f392d09ce797266 (diff)
Convert a couple last sprintf calls to snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--info.c2
-rw-r--r--save.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/info.c b/info.c
index 2c51fd4..6825765 100644
--- a/info.c
+++ b/info.c
@@ -226,7 +226,7 @@ DisplayProps(ClientRec *client)
XtNstring, buffer.bufStart,
NULL);
- sprintf (buffer.bufStart,
+ snprintf (buffer.bufStart, buffer.bufSize,
"SM Properties : %s", clientListNames[index]);
ptr = Strstr (buffer.bufStart, ") Restart");
diff --git a/save.c b/save.c
index 3cb0c36..a6e0757 100644
--- a/save.c
+++ b/save.c
@@ -420,7 +420,7 @@ SaveOkXtProc(Widget w, XtPointer client_data, XtPointer callData)
{
name_locked = False;
- sprintf (label, "Another session by the name '%s' already exists.\nWould you like to overwrite it?", name);
+ snprintf (label, sizeof(label), "Another session by the name '%s' already exists.\nWould you like to overwrite it?", name);
XtManageChild (nameInUseOverwriteButton);