Bug 690286

Summary: Error: limitcheck; OffendingCommand: addglyph
Product: Ghostscript Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: TextAssignee: Alex Cherepanov <alex>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 0.00   
Hardware: All   
OS: All   
Customer: Word Size: ---
Attachments: Sample_HP5000PS.ps
patch

Description Marcos H. Woehrmann 2009-02-12 07:50:12 UTC
A user reports that the attached file produces an "Error: limitcheck; OffendingCommand: addglyph" when 
read by gs8.63.  I've duplicated the problem with 8.63 and head (r9471).

The command line I'm using for testing:

  bin/gs -sDEVICE=tiff24nc -o test.tif ./Sample_HP5000PS.ps

Both Adobe Distiller 9.0 and Apple Preview read the file without error.
Comment 1 Marcos H. Woehrmann 2009-02-12 07:50:31 UTC
Created attachment 4791 [details]
Sample_HP5000PS.ps
Comment 2 Alex Cherepanov 2009-02-12 09:28:39 UTC
Created attachment 4792 [details]
patch

The buffer for the compressed /CharString in Type 32 font was allocated for
the worst case of CCITTFaxEncode filter, which is 5x expansion.

The worst case in the sample file exceeded the max string size. The patch
limits
the string size to 65535, the maximum string length. The worst case is highly
unlikely to occur in the wild.
Comment 3 Alex Cherepanov 2009-02-12 13:08:48 UTC
The patch is committed as a rev. 9472.

Regression testing shows no differences.