mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-12 00:44:27 -06:00
The Word XML Document (Flat OPC) reader counted only the parts it kept: a repeated or nameless part, a child of the package that isn't a part and anything nested inside one were read without being counted, nesting had no cap, and a part's inline XML was copied before its size was checked. Every child of the package now counts against the part limit and every part's data against the part and package size limits, kept or not; nesting and the elements of each child are capped as the XML tree reader caps a part's; and data is checked before it is copied. Base64 in pkg:binaryData was taken from plain text only, so CDATA and character references were dropped and a picture written that way lost bytes. Both now read as the same text, and an entity there is an invalid base64 error. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>