summaryrefslogtreecommitdiff
path: root/xfontsel.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-16 19:04:30 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-28 22:03:43 -0700
commit561085a83a777fec4b42cfa16a8ba80e971d86fb (patch)
treebfd49530d7ff327237d99d1811acad8a45e2012e /xfontsel.c
parent1d6970a838d4ed42a8c91a10cb5311f98ba959c3 (diff)
Convert sprintf calls to snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xfontsel.c')
-rw-r--r--xfontsel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfontsel.c b/xfontsel.c
index 1fd4b6c..efa01c8 100644
--- a/xfontsel.c
+++ b/xfontsel.c
@@ -314,7 +314,7 @@ see 'xfontsel' manual page."
for (f = 0; f < FIELD_COUNT; f++) {
char name[10];
FieldMenuRec *makeRec = XtNew(FieldMenuRec);
- sprintf( name, "field%d", f );
+ snprintf( name, sizeof(name), "field%d", f );
XtCreateManagedWidget("dash",labelWidgetClass,fieldBox,NZ);
field = XtCreateManagedWidget(name, menuButtonWidgetClass,
fieldBox, NZ);
@@ -1014,7 +1014,7 @@ static void SetCurrentFontCount(void)
if (matchingFontCount == 1)
strcpy( label, "1 name matches" );
else if (matchingFontCount)
- sprintf( label, "%d names match", matchingFontCount );
+ snprintf( label, sizeof(label), "%d names match", matchingFontCount );
else
strcpy( label, "no names match" );
XtSetArg( args[0], XtNlabel, label );
@@ -1029,7 +1029,7 @@ static void SetParsingFontCount(int count)
if (count == 1)
strcpy( label, "1 name to parse" );
else
- sprintf( label, "%d names to parse", count );
+ snprintf( label, sizeof(label), "%d names to parse", count );
XtSetArg( args[0], XtNlabel, label );
XtSetValues( countLabel, args, ONE );
FlushXqueue(XtDisplay(countLabel));