[NTG-pdftex] Re: [ pdftex-Feature Requests-87 ] In case of fatal errors, delete the output file

Martin Schröder martin at oneiros.de
Mon Dec 19 01:01:19 CET 2005


On 2005-12-19 05:08:18 +0530, noreply at sarovar.org wrote:
> Initial Comment:
> When pdfTeX currently encounters a fatal error, it
> 
> closes it's output file, which leads to
> 
> incomplete/corrupt files.
> 
> 
> 
> pdfTeX should produce only valid files, and in case of
> 
> fatal errors the output should be deleted.
> 
> ----------------------------------------------------------------------
> 
> >Comment By: Martin Schröder (oneiros)
> Date: 2005-12-19 00:38
> 
> Message:
> Logged In: YES 
> user_id=421
> 
> The attached patch unlinks the current file, if a fatal
> 
> error happens. Currently this is done without any checks,
> 
> and may be a security problem.

The patch does this:

    if (outputfilename) {
        xfclose(pdffile, makecstring(outputfilename));
        unlink (makecstring(outputfilename));
    }

How safe is this? And how safe is this for TeX security wise? And
is there a better way?

Best
    Martin
-- 
                    http://www.tm.oneiros.de


More information about the ntg-pdftex mailing list