johnwhitington/camlpdf

Malformed LZW stream fails

johnwhitington opened this issue · 1 comments

Firstly, there should be a better error than "index out of bounds".

Secondly, we should support it, because Adobe Reader and Preview and Ghostscript do. (Qpdf and pdftk fail).

See customer file pdfs/MalformedLZWStream.pdf.

Committed a tentative fix: just increased the array sizes to 8192. Seems to work, and doesn't break any other files.