summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2015-01-17 18:36:07 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-01-17 18:36:07 -0800
commita5221fc11307eb1230ae2643c6e423b0f7867fde (patch)
tree5460bf32293d36bd1f18dc4fad0b0def94bbd0cf /src
parent0037a42107b952c9d903719615747e760e4e7247 (diff)
Replace sprintf call with snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r--src/encparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/encparse.c b/src/encparse.c
index d10634d..ca4fc0f 100644
--- a/src/encparse.c
+++ b/src/encparse.c
@@ -833,8 +833,8 @@ FontEncReallyReallyLoad(const char *charset,
encoding = NULL;
if (!format[0]) {
- sprintf(format, "%%%ds %%%d[^\n]\n", (int)sizeof(encoding_name) - 1,
- (int)sizeof(file_name) - 1);
+ snprintf(format, sizeof(format), "%%%ds %%%d[^\n]\n",
+ (int)sizeof(encoding_name) - 1, (int)sizeof(file_name) - 1);
}
for(;;) {
count = fscanf(file, format, encoding_name, file_name);