mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Also check maybeLength
when deciding if a stream is empty in Parser_makeFilter
(issue 6360)
The problem with the PDF files in the issue, besides the obviously broken XRef tables which we're able to recover from, is that many/most of the streams have Dictionaries where the `Length` entry is set to `0`. This causes us to return `NullStream`, instead of the appropriate one in `Parser_makeFilter`. Fixes 6360.
This commit is contained in:
parent
78dbf56484
commit
5128603f64
3 changed files with 11 additions and 1 deletions
|
@ -524,7 +524,7 @@ var Parser = (function ParserClosure() {
|
|||
return stream;
|
||||
},
|
||||
makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) {
|
||||
if (stream.dict.get('Length') === 0) {
|
||||
if (stream.dict.get('Length') === 0 && !maybeLength) {
|
||||
return new NullStream(stream);
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue