]> git.eshelyaron.com Git - emacs.git/commitdiff
(doc-view-ghostscript-options, doc-view-ps->pdf):
authorReiner Steib <Reiner.Steib@gmx.de>
Thu, 18 Oct 2007 19:24:30 +0000 (19:24 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Thu, 18 Oct 2007 19:24:30 +0000 (19:24 +0000)
Add comment about "-dSAFER".

lisp/ChangeLog
lisp/doc-view.el

index 15309eac955ee5a835348daf854b14de020e1c7b..7f0615e1dd5d9243287086e67592fb6bb9bdc4a6 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-18  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * doc-view.el (doc-view-ghostscript-options, doc-view-ps->pdf):
+       Add comment about "-dSAFER".
+
 2007-10-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * term/xterm.el: Don't require xt-mouse.
index 64ee1bbd8eaadd7ed9213716967f58704d89faa7..241b87065d3ec25a9bf09c3af966d5ae53da9b90 100644 (file)
   :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)