You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
I found pdftops/gfile.cxx remains insecure tmpnam using.
Warning from gcc (Debian GNU/Linux unstable gcc-3.3.2) says:
libxpdf.a(gfile.o)(.text+0x59d): In function openTempFile(GString**, _IO_FILE** , char const*, char const*)': cupsys-1.1.20candidate6/pdftops/gfile.cxx:499: warning: the use oftmpnam' is dangerous, better use `mkstemp'
tmpnam by itself is not insecure - the Xpdf code opens the tmpnam filename using the appropriate flags (O_EXCL and others).
The reason for the tmpnam code was to support LZW compressed streams on platforms using the "uncompress" command. Since some implementations of "uncompress" required a trailing ".Z" on the filename, the only function capable of supporting a temporary filename of this form was tmpnam.
That said, it appears that the LZW code is now implemented internally in Xpdf (thanks to the patent expiration... :), so I'll rip out the last vestiges of tmpnam for CUPS 1.1.20.
Activity
michaelrsweet commentedon Nov 17, 2003
CUPS.org User: mike
tmpnam by itself is not insecure - the Xpdf code opens the tmpnam filename using the appropriate flags (O_EXCL and others).
The reason for the tmpnam code was to support LZW compressed streams on platforms using the "uncompress" command. Since some implementations of "uncompress" required a trailing ".Z" on the filename, the only function capable of supporting a temporary filename of this form was tmpnam.
That said, it appears that the LZW code is now implemented internally in Xpdf (thanks to the patent expiration... :), so I'll rip out the last vestiges of tmpnam for CUPS 1.1.20.
Thanks!
michaelrsweet commentedon Nov 19, 2003
CUPS.org User: mike
Fixed in CVS - the anonymous CVS repository will be updated at midnight EST.