Files
pdfcraft/crates
skylar taylor-barrick 6609bc3f68 fix(cos): keep saves incremental when only the /Encrypt place differs (#3276)
From review. Where the /Encrypt dictionary is stored, its object number
or inline, is no longer part of the security comparison: the overlay
takes it from the snapshot with its trailer, so undo past an optimized
save still appends to that save. A full rewrite is left for an actual
change of encryption: another dictionary or key, or below revision 5 a
different first /ID. AES-256 keys don't depend on /ID, so it is no
longer compared there, here or when reopening with a known key.

overlay_changes_from now decides alone: Ok(false), changing nothing,
when security differs, and save_bytes acts on that. A signed document
refuses with SignedRewrite instead of being rewritten.

The overlay also writes again any unchanged object packed in an object
stream that the update replaces or frees. After an optimized save such
an object read back as null from the next save.
2026-10-18 21:37:14 +02:00
..
2026-10-16 14:11:53 +00:00
…