mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
#1277: ignoring error for bad "empty" block
This commit is contained in:
parent
4d9ee7b530
commit
aac0f80aad
1 changed files with 4 additions and 1 deletions
|
@ -504,8 +504,11 @@ var FlateStream = (function FlateStreamClosure() {
|
|||
if (typeof (b = bytes[bytesPos++]) == 'undefined')
|
||||
error('Bad block header in flate stream');
|
||||
check |= (b << 8);
|
||||
if (check != (~blockLen & 0xffff))
|
||||
if (check != (~blockLen & 0xffff) &&
|
||||
(blockLen !== 0 || check !== 0)) {
|
||||
// Ignoring error for bad "empty" block (see issue 1277)
|
||||
error('Bad uncompressed block length in flate stream');
|
||||
}
|
||||
|
||||
this.codeBuf = 0;
|
||||
this.codeSize = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue