Page 1 of 1

Temp files always created in current directory when image is read from stdin

Posted: 2015-05-22T07:59:38-07:00
by djbcmp
Whenever I display an image from stdin, like this:

Code: Select all

$ cat myfile.jpg | display -
"display" creates temp files in the current directory, no matter how I set ImageMagick's environment variables MAGICK_TMPDIR, MAGICK_TEMPORARY_PATH, etc. This would appear to be a bug.

The temp files have names like "magickh9EMwm". I can see them getting created by monitoring the directory:

Code: Select all

$ inotifywait -m -e create mydirectory
This is on Ubuntu 14.04. Version info:

Code: Select all

$ display --version
Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP  

Re: Temp files always created in current directory when image is read from stdin

Posted: 2015-07-31T11:38:14-07:00
by broucaries
If true this is a huge security bug

Re: Temp files always created in current directory when image is read from stdin

Posted: 2015-07-31T11:46:58-07:00
by fmw42
I see no such behavior in IM 6.9.1.10 Q16 Mac OSX Snow Leopard. No temp file is created in the current directory as far as I can tell. IM 6.7.7.10 is about 140 versions old. This issue has probably been long fixed. Try the command on a newer version of IM or perhaps upgrade.