Bug 696499

Summary: Corrupted PDF hangs PDF conversion
Product: Ghostscript Reporter: beppecosta <beppecosta>
Component: PDF InterpreterAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED FIXED    
Severity: normal CC: beppecosta, chris.liddell
Priority: P4    
Version: 9.18   
Hardware: Other   
OS: other   
Customer: Word Size: ---
Attachments: PDF than makes interpreter to loop

Description beppecosta 2016-01-07 02:35:11 UTC

    
Comment 1 beppecosta 2016-01-07 02:41:40 UTC
Created attachment 12222 [details]
PDF than makes interpreter to loop
Comment 2 beppecosta 2016-01-07 02:43:52 UTC
A PDF (maybe damaged while being tranferred) makes PDF interpreter to hang and print the last error line infinitely.

**** Warning:  An error occurred while reading an XREF table.                       
**** The file has been damaged.  This may have been caused                          
**** by a problem while converting or transfering the file.                         
**** Ghostscript will attempt to recover the data.                                  
**** Warning: stream Length incorrect.                                              
**** Warning: stream Length incorrect.                                              
**** Warning: Invalid operator '-' is assumed to be a number 0.                     
**** Unknown operator: '0753-324.2' looks like a malformed number, replacing with 0.
**** Unknown operator: '5787..2' looks like a malformed number, replacing with 0.   
**** Unknown operator: '5-24' looks like a malformed number, replacing with 0.      
**** Unknown operator: '5-24' looks like a malformed number, replacing with 0.      
**** Ignoring changes to the graphic state after operator 'W'.                      
**** Ignoring changes to the graphic state after operator 'W'.                      
**** Ignoring changes to the graphic state after operator 'W'.
....
....
Comment 3 Chris Liddell (chrisl) 2016-01-08 07:34:32 UTC
Fixed in:

http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=03456d0a
Comment 4 beppecosta 2016-01-11 01:36:44 UTC
Hello Chris,

I've rebuilt with the patch and now it does NOT loop anymore. 

(Note that the pdf was "very corrupted" because of a wrong ftp method, text instead of binary).

Thanks a lot for your fix.

Giuseppe.