Skip to content

fix(loader): bound object-stream decompression at load (lopdf 0.44) - #478

Open
abimaelmartell wants to merge 2 commits into
mainfrom
chore/lopdf-044-objstm-cap
Open

fix(loader): bound object-stream decompression at load (lopdf 0.44)#478
abimaelmartell wants to merge 2 commits into
mainfrom
chore/lopdf-044-objstm-cap

Conversation

@abimaelmartell

@abimaelmartell abimaelmartell commented Sep 1, 2026

Copy link
Copy Markdown
Member

Update lopdf

Some tagged PDFs pack their structure tree into object streams that
inflate to ~1.5 GiB from a 21 MB file; lopdf expands every object
stream eagerly at load, so one such document exhausts memory before
any of our code runs. Bump lopdf 0.42 -> 0.44 and set its new
max_decompressed_size load option (8 MiB per stream). Oversized
streams are skipped by lopdf, and a zero-page check fails the load
cleanly if the page tree itself got skipped.

0.44 made get_page_content infallible; adjusted the one call site.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Shadow auto-approve: would not auto-approve because issues were found.

Fix all with cubic | Re-trigger cubic

Comment thread src/extractor/content_stream.rs Outdated
Comment thread src/lib.rs
…rning

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Shadow auto-approve: would not auto-approve. Auto-approval blocked by 1 unresolved issue from previous reviews.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant