Bug 21713 - faulty logic in goo/gfile.cc (openTempFile)
Summary: faulty logic in goo/gfile.cc (openTempFile)
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-13 00:30 UTC by Peter Breitenlohner
Modified: 2009-05-13 15:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.