Files
pdfcraft/crates
Dylan M. Taylor 19bb96b032 fix(redact): bound structure-tree walks by their work, not only their references
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.
2026-11-03 15:30:50 +00:00
..
…