PDF: prevent excessive allocations in jbig2dec code