diff options
Diffstat (limited to 'source/pdf/pdf-cmap-load.c')
-rw-r--r-- | source/pdf/pdf-cmap-load.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/pdf/pdf-cmap-load.c b/source/pdf/pdf-cmap-load.c index 87b1c282..d73749cd 100644 --- a/source/pdf/pdf-cmap-load.c +++ b/source/pdf/pdf-cmap-load.c @@ -89,7 +89,10 @@ pdf_new_identity_cmap(fz_context *ctx, int wmode, int bytes) fz_try(ctx) { unsigned int high = (1 << (bytes * 8)) - 1; - sprintf(cmap->cmap_name, "Identity-%c", wmode ? 'V' : 'H'); + if (wmode) + fz_strlcpy(cmap->cmap_name, "Identity-V", sizeof cmap->cmap_name); + else + fz_strlcpy(cmap->cmap_name, "Identity-H", sizeof cmap->cmap_name); pdf_add_codespace(ctx, cmap, 0, high, bytes); pdf_map_range_to_range(ctx, cmap, 0, high, 0); pdf_sort_cmap(ctx, cmap); |