[cups.bugs] [HIGH] STR #1801: pdftops filter produces invalid output

Patrick Gosling jpmg at eng.cam.ac.uk
Mon Jun 26 05:10:25 PDT 2006


[STR New]

pdftops/PSOutputDev.cxx:1161

  writePSFmt("% Produced by xpdf/pdftops %s\n", xpdfVersion);

passes the string through a function in the printf family.  Handling of
the character sequence "% " is I believe specified to be undefined.  

In practice, some operating systems map it to "% " (and thus no problem
arises), but (for instance) when compiling on Solaris platforms, it is
mapped to "", thus resulting in a bogus uncommented line near the top of
the PS header.

I believe that

  writePSFmt("%% Produced by xpdf/pdftops %s\n", xpdfVersion);

is both safe and correct on all platforms (I _think_ it's ok to
intersperse non-DSC comments within the DSC header)

Link: http://www.cups.org/str.php?L1801
Version: 1.2.1





More information about the cups-devel mailing list