Bug 696499 - Corrupted PDF hangs PDF conversion
Summary: Corrupted PDF hangs PDF conversion
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 9.18
Hardware: Other other
: P4 normal
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-07 02:35 UTC by beppecosta
Modified: 2016-01-11 01:36 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
PDF than makes interpreter to loop (79.58 KB, application/pdf)
2016-01-07 02:41 UTC, beppecosta
Details

Note You need to log in before you can comment on or make changes to this bug.
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.