summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2021-11-28 12:49:54 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2021-12-03 18:38:19 +0000
commit3ceafc3e134069ecd46df6482e8e7d4b5a7051c3 (patch)
tree286e3da987e37913704487386b8c02a16ee50dad
parentba4fcf04c661dd59ddd4153d442da5fe56381ab2 (diff)
PrintProperty: replace sprintf with snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xlsfonts.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xlsfonts.c b/xlsfonts.c
index 52d3807..2d8d3f2 100644
--- a/xlsfonts.c
+++ b/xlsfonts.c
@@ -497,9 +497,8 @@ PrintProperty(XFontProp * prop)
atom = XGetAtomName(dpy, prop->name);
if (!atom) {
+ snprintf(nosuch, sizeof(nosuch), "No such atom = %ld", prop->name);
atom = nosuch;
- nosuch[0] = '\0';
- (void) sprintf(atom, "No such atom = %ld", prop->name);
}
printf(" %s", atom);