mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
#2098: scanning for stream length when it's incorrect
This commit is contained in:
parent
c3096d98d4
commit
4d9ee7b530
3 changed files with 55 additions and 2 deletions
|
@ -141,6 +141,12 @@ var ChunkedStream = (function ChunkedStreamClosure() {
|
|||
return bytes.subarray(pos, end);
|
||||
},
|
||||
|
||||
peekBytes: function ChunkedStream_peekBytes(length) {
|
||||
var bytes = this.getBytes(length);
|
||||
this.pos -= bytes.length;
|
||||
return bytes;
|
||||
},
|
||||
|
||||
getByteRange: function ChunkedStream_getBytes(begin, end) {
|
||||
this.ensureRange(begin, end);
|
||||
return this.bytes.subarray(begin, end);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue