summaryrefslogtreecommitdiff
path: root/xkbprint.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-27 21:04:05 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-27 21:04:05 -0700
commite7aa5ea85d57b90c1ee3244facd2dfd4d3ff1cd5 (patch)
tree4b658a77b5ac7bf4f80b34be02b9a1cfe513a89a /xkbprint.c
parentbfb6044479e8e974e848f47969f75b84865fea13 (diff)
Replace remaining sprintf calls with snprintf()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xkbprint.c')
-rw-r--r--xkbprint.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xkbprint.c b/xkbprint.c
index fe2219d..1dd68dd 100644
--- a/xkbprint.c
+++ b/xkbprint.c
@@ -498,9 +498,9 @@ parseArgs(int argc, char *argv[])
exit(1);
}
if (args.wantEPS)
- sprintf(outputFile, "stdin.eps");
+ snprintf(outputFile, len, "stdin.eps");
else
- sprintf(outputFile, "stdin.ps");
+ snprintf(outputFile, len, "stdin.ps");
}
else if ((outputFile == NULL) && (inputFile != NULL)) {
size_t len;
@@ -523,9 +523,9 @@ parseArgs(int argc, char *argv[])
ext = strrchr(base, '.');
if (ext == NULL) {
if (args.wantEPS)
- sprintf(outputFile, "%s.eps", base);
+ snprintf(outputFile, len, "%s.eps", base);
else
- sprintf(outputFile, "%s.ps", base);
+ snprintf(outputFile, len, "%s.ps", base);
}
else {
strcpy(outputFile, base);
@@ -540,7 +540,7 @@ parseArgs(int argc, char *argv[])
char *ch, *name, buf[128];
if (inDpyName[0] == ':')
- sprintf(name = buf, "server%s", inDpyName);
+ snprintf(name = buf, sizeof(buf), "server%s", inDpyName);
else
name = inDpyName;