From 6a658a30577e3b020632b1d03f5fe8b6a33809ee Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Thu, 18 Oct 2007 19:24:30 +0000 Subject: [PATCH] (doc-view-ghostscript-options, doc-view-ps->pdf): Add comment about "-dSAFER". --- lisp/ChangeLog | 5 +++++ lisp/doc-view.el | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 15309eac955..7f0615e1dd5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-10-18 Reiner Steib + + * doc-view.el (doc-view-ghostscript-options, doc-view-ps->pdf): + Add comment about "-dSAFER". + 2007-10-18 Stefan Monnier * term/xterm.el: Don't require xt-mouse. diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 64ee1bbd8ea..241b87065d3 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -120,9 +120,10 @@ :group 'doc-view) (defcustom doc-view-ghostscript-options - '("-dNOPAUSE" "-sDEVICE=png16m" "-dTextAlphaBits=4" - "-dBATCH" "-dGraphicsAlphaBits=4" "-dQUIET" - "-dSAFER" "-r100") + '("-dSAFER" ;; Avoid security problems when rendering files from untrusted + ;; sources. + "-dNOPAUSE" "-sDEVICE=png16m" "-dTextAlphaBits=4" + "-dBATCH" "-dGraphicsAlphaBits=4" "-dQUIET" "-r100") "A list of options to give to ghostscript." :type '(sexp) :group 'doc-view) @@ -488,7 +489,10 @@ It's a subdirectory of `doc-view-cache-directory'." (setq doc-view-current-converter-process (start-process "ps->pdf" doc-view-conversion-buffer doc-view-ps2pdf-program - ps pdf "-dSAFER") + ps pdf + ;; Avoid security problems when rendering files from + ;; untrusted sources. + "-dSAFER") mode-line-process (list (format ":%s" doc-view-current-converter-process))) (set-process-sentinel doc-view-current-converter-process 'doc-view-ps->pdf-sentinel) -- 2.39.2