mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-31 07:39:08 +00:00
- Redacting a CCITT image went through decoded_image, which undoes the filters before the fax decoder up to MAX_DECODED, so a Flate bomb in front of a fax image cost a gigabyte while every other image stops at twice its raster. Document::decoded_image_within takes a bound, and redaction gives a fax image's code about a byte per pixel. A fax image cut short, or behind a bomb, is removed whole; a busy one whose code is bigger than twice its raster is still cleared. - Every image is now decoded through decoded_image_within, which reads /DecodeParms through Document::with_direct_parms: given by reference, the numbers inside (/Predictor 7 0 R) included. That reading was first written here and has moved down to #4304. The predictor test now covers the dictionary, an array's entry and the number itself given by reference; read without them, the cleared bytes drift off the covered pixel and the covered sample stays in the copy. From reviews with the pdfcraft-review skill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>