Bug 690215 - PostScript array size limit breaks on PostScript files large images
Summary: PostScript array size limit breaks on PostScript files large images
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: 8.63
Hardware: All All
: P4 major
Assignee: Default assignee
URL: https://bugs.edge.launchpad.net/ubunt...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-02 02:25 UTC by Till Kamppeter
Modified: 2009-01-02 09:42 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Till Kamppeter 2009-01-02 02:25:11 UTC
See

https://bugs.edge.launchpad.net/ubuntu/+source/cups/+bug/311982

In this case Ghostscript is fed with a PostScript file which contains a large
image (full-page photo printout). The PostScript file is generated by the
Poppler- (or XPDF-) based pdftops filter (called by CUPS' pdftops filter of
Ubuntu Intrepid) and afterwards passed through CUPS' pstops filter (both
processes are called by the cpdftocps CUPS filter in Ubuntu Intrepid.

The resulting PostScript contains the following line

xpdf begin

114642 array dup /ImData_7_0 exch def

which makes Ghostscript crashing as there seems to be a hard limit to 65535
elements in a PostScript array for Ghostscript.

See additional information and the exact Ghostscript command line in the Ubuntu
bug report.

Operating system is Ubuntu Intrepid.
Comment 1 Ralph Giles 2009-01-02 02:32:59 UTC
The 64k limit to array sizes is consistent with the guidelines in section B.1 of
the Postscript Language Reference. I suggest that the creator shouldn't expect
such a request to work on most interpreters.
Comment 2 Ray Johnston 2009-01-02 09:32:04 UTC
Ghostscript has extensions for 'large arrays' implemented as arrays of
arrays. This method should be used by xpdf to properly implement PDF->PS
translation since 65535 is a limit almost all PS interpreters have.

Closing as INVALID and I suggest that this problem get posted to the xpdf
maintainers.
Comment 3 Till Kamppeter 2009-01-02 09:42:39 UTC
I have already forwarded the problem to the Poppler bug tracker and the
developers have provided a patch which works with both Poppler and XPDF (see
Ubuntu bug report). The patch is based on arrays of arrays, as you suggest.