[luatex] Prevent stop when tiff file loads

Philipp Gesang phg at phi-gamma.net
Fri Jan 22 07:45:34 CET 2016

···<date: 2016-01-21, Thursday>···<from: luigi scarso>···

> On Thu, Jan 21, 2016 at 10:10 PM, Patrick Gundlach <patrick at gundla.ch>
> wrote:
> > >> Is there a way to prevent LuaTeX from stopping the whole process? Is
> > there a function like
> >
> Why not mimic the Unix file command in Lua ?

This is less trivial than it’d appear: file(1)’s recognition
magic has been improved and battle-tested over the years. It’ll
be hard to arrive at that level with a custom implementation,
especially from a security standpoint: Scanning a well prepared
user-supplied file can DOS your machine. Why not invoke file (or
perhaps identify(1)) directly?


(A Lua implementation of file would be interesting though =))

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://tug.org/pipermail/luatex/attachments/20160122/3ae09744/attachment-0001.bin>

More information about the luatex mailing list