Ghostscript brain-dead...

Sat, 29 May 2010 20:05:57 +0200
warning

Some little warning to everyone using ghostscript:

Ghostscript always looks for files in the current directory first, including a file that is always executed first (before any safe mode is activated).

So by running ghostscript in a directory you do not control, you might execute arbitrary stuff.

Two things make this worse:

When viewing a pdf file with gv, gv always changes in the directory where the file is, so don't use it to view files in such directories.

The option to disable this behaviour (-P-) does not seem to work at all.

You have been warned.