Bug 21713

Summary: faulty logic in goo/gfile.cc (openTempFile)
Product: poppler Reporter: Peter Breitenlohner <peb>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Peter Breitenlohner 2009-05-13 00:30:35 UTC
Contrary to xpdf, poppler tries to avoid the use of tmpnam() when mkstemp() is found but mkstemps() is not found [never saw a description of mkstemps].

This results in using mkstemp with an argument "prefixXXXXXX.ext", which will always fail -- at least with GNU libc 2.3.x and 2.4.

It seems there is no good way to safely create a temporary file with an extension. Why would one need that. In xpdf and poppler the last argument of openTempFile is always NULL, so this whole thing is broken but unused, i.e., superfluous.
Comment 1 Albert Astals Cid 2009-05-13 15:30:19 UTC
Removed the possibility to specify the extension altogether, will be in poppler 0.12

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.