diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-04-24 13:45:29 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-04-27 15:11:37 +0200 |
commit | 4fe64a86f24b4aa5cb92f35fe025200cf42144ea (patch) | |
tree | 2c9abd8613df7ca07f669f71168bb6b9d60bacbe /source/xps/xps-zip.c | |
parent | 99278e762603380638ad037094a955312013e94c (diff) | |
download | mupdf-4fe64a86f24b4aa5cb92f35fe025200cf42144ea.tar.xz |
Use fz_snprintf.
Diffstat (limited to 'source/xps/xps-zip.c')
-rw-r--r-- | source/xps/xps-zip.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/xps/xps-zip.c b/source/xps/xps-zip.c index fe363b34..0e8d8edc 100644 --- a/source/xps/xps-zip.c +++ b/source/xps/xps-zip.c @@ -62,7 +62,7 @@ xps_read_part(fz_context *ctx, xps_document *doc, char *partname) seen_last = 0; for (count = 0; !seen_last; ++count) { - sprintf(path, "%s/[%d].piece", name, count); + fz_snprintf(path, sizeof path, "%s/[%d].piece", name, count); if (fz_has_archive_entry(ctx, zip, path)) { tmp = fz_read_archive_entry(ctx, zip, path); @@ -71,7 +71,7 @@ xps_read_part(fz_context *ctx, xps_document *doc, char *partname) } else { - sprintf(path, "%s/[%d].last.piece", name, count); + fz_snprintf(path, sizeof path, "%s/[%d].last.piece", name, count); if (fz_has_archive_entry(ctx, zip, path)) { tmp = fz_read_archive_entry(ctx, zip, path); @@ -99,10 +99,10 @@ xps_has_part(fz_context *ctx, xps_document *doc, char *name) name++; if (fz_has_archive_entry(ctx, doc->zip, name)) return 1; - sprintf(buf, "%s/[0].piece", name); + fz_snprintf(buf, sizeof buf, "%s/[0].piece", name); if (fz_has_archive_entry(ctx, doc->zip, buf)) return 1; - sprintf(buf, "%s/[0].last.piece", name); + fz_snprintf(buf, sizeof buf, "%s/[0].last.piece", name); if (fz_has_archive_entry(ctx, doc->zip, buf)) return 1; return 0; |