Bug 690628 - don't throw for incomplete Deflate streams
Summary: don't throw for incomplete Deflate streams
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: fitz (show other bugs)
Version: unspecified
Hardware: All All
: P4 normal
Assignee: Tor Andersson
URL: http://code.google.com/p/sumatrapdf/i...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-13 14:23 UTC by zeniko
Modified: 2009-07-18 05:50 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 zeniko 2009-07-13 14:23:26 UTC
The document linked from the URL apparently contains an incomplete Deflate stream. 
Nonetheless, the document displays exactly as in Adobe Reader, if we don't throw 
by requesting more input but instead be done with it as in 
http://code.google.com/p/sumatrapdf/source/detail?r=1302 (this might still throw 
later on, if the stream indeed was too incomplete).
Comment 1 zeniko 2009-07-13 17:47:03 UTC
Turns out that this issue is also solved by calling inflate with flush=Z_FINISH at 
the end of the stream (which per zlib's documentation is even required): http://code.google.com/p/sumatrapdf/source/detail?r=1304