mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-10 13:35:21 +00:00
The tag cleanup walks recorded a parent relation and queued an element's kids for every listing, before checking whether the reference had been seen. An indirect /K array shared by many elements was expanded again for each, so a few thousand objects could queue and record millions of relations; only distinct references counted against the limit. Parent relations are now a set per element, so repeats are held once, and every queued item is charged to a step allowance (and the queue to a length cap) derived from the walk's reference limit. Past either the cleanup can't be shown complete and is refused (RedactError::Tags), as a tree past the reference limit already is.