summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2018-08-31 16:52:55 -0700
committerSebastian Rasmussen <sebras@gmail.com>2018-09-04 18:23:31 +0800
commit8cd5b5203eb4468071d2be89d8bdd3dc71de14dd (patch)
tree7308e88a315ee12acc8adbfbf7775baf30ce4a55
parent76316cd7ec5e53b1acb797185b852f9874112c4d (diff)
downloadmupdf-8cd5b5203eb4468071d2be89d8bdd3dc71de14dd.tar.xz
Add -dSAFER to gs calls in gproof.
Unlikely that this could be an issue, but lets add it for safety.
-rw-r--r--source/gprf/gprf-doc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/gprf/gprf-doc.c b/source/gprf/gprf-doc.c
index aeec0ee4..18aea342 100644
--- a/source/gprf/gprf-doc.c
+++ b/source/gprf/gprf-doc.c
@@ -658,6 +658,7 @@ generate_page(fz_context *ctx, gprf_page *page)
fz_snprintf(arg_lp, sizeof(arg_lp), "-dLastPage=%d", page->number+1);
argv[argc++] = arg_lp;
argv[argc++] = "-I%rom%Resource/Init/";
+ argv[argc++] = "-dSAFER";
fz_snprintf(arg_g, sizeof(arg_g), "-g%dx%d", page->width, page->height);
argv[argc++] = arg_g;
argv[argc++] = doc->pdf_filename;
@@ -685,7 +686,7 @@ generate_page(fz_context *ctx, gprf_page *page)
#else
char gs_command[1024];
/* Invoke gs to convert to a temp file. */
- fz_snprintf(gs_command, sizeof(gs_command), "gswin32c.exe -sDEVICE=gprf %s %s -dFitPage -o \"%s\" -dFirstPage=%d -dLastPage=%d -I%%rom%%Resource/Init/ -g%dx%d \"%s\"",
+ fz_snprintf(gs_command, sizeof(gs_command), "gswin32c.exe -sDEVICE=gprf %s %s -dSAFER -dFitPage -o \"%s\" -dFirstPage=%d -dLastPage=%d -I%%rom%%Resource/Init/ -g%dx%d \"%s\"",
print_profile == NULL ? "-dUsePDFX3Profile" : print_profile, disp_profile,
filename, page->number+1, page->number+1, page->width, page->height, doc->pdf_filename);
fz_system(ctx, gs_command);