From: Kalervo Kujala Date: Mon, 17 Oct 2011 19:24:19 +0000 (+0300) Subject: Handle blackTable2 array access correctly. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6688c3a1f5c1ff8d0071bba8d76e60df9f99ec2f;p=pdf.js.git Handle blackTable2 array access correctly. --- diff --git a/pdf.js b/pdf.js index 6077480..f11d28c 100644 --- a/pdf.js +++ b/pdf.js @@ -2098,7 +2098,7 @@ var CCITTFaxStream = (function ccittFaxStream() { if (i < end) code <<= end - i; if (code >= limit) { - var p = table[code]; + var p = table[code - ((limit == -1) ? 0 : limit)]; if (p[0] == i) { this.eatBits(i); return [true, p[1]];