mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-26 11:19:48 +00:00
cbcdca77f0
import_pages_with and insert_file_pages took the objects numbered above the destination's highest number for the ones the import added. When no number is left above the highest (an exhausted /Size, or object 4294967295), Document::add fills free numbers below it: the copies skipped resource sharing, and a refused import left its objects in the destination. With object 4294967295 the `n + 1` overflowed, a panic in debug builds and in release a wrap to 0 that counted every object as added. Record the object numbers before the import and take the ones present afterwards but not before.