mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-11-30 16:37:18 +01:00
Some PDFs open a marked content section inside a text object and never close it. Each section adds a nesting level in the text layer, so the DOM becomes deep enough to crash Chromium with a stack overflow. When extracting the text, the sections opened after the matching BT are now closed on ET. The marked content level is tracked per stream in both getTextContent and getOperatorList: the sections a stream left open are closed when it ends, and an unbalanced EMC is ignored.
741 B
741 B