vectorcraft/crates/metafile/src
bflatastic 0efcaeb558 Importers: a brush that draws itself by name no longer crashes
A scatter brush whose art is an instance of a symbol stroked with that brush, or any brush whose
art is painted with a pattern whose tile is stroked with it, drew itself without end: a stack
overflow in a hand-written native file. Brush pieces already strip the brushes of their own
strokes; now what they draw by name that would draw a brushed stroke (a symbol instance, or a
pattern paint, also through the symbols and patterns those use) is left out too, in one place
(`stroke_pieces`, which every renderer and exporter calls with the document).

Probed the rest of item 2 of the depth follow-up with hand-written hostile inputs, kept as tests:
graph designs of deep art and of a symbol holding itself, Affinity groups nested to and past
both of its reader's caps, DXF blocks inserting themselves, EMF/WMF saving states without end,
and plug-in manifests and output nested 30,000 to 100,000 deep. None of them overflowed.
2026-10-14 10:13:45 +07:00
..
import Lint: as_chunks for constant chunk sizes, as clippy 1.99 asks 2026-10-05 12:14:56 -07:00
bytes.rs M4.95: EMF and WMF open, place and paste as vector objects 2026-10-05 15:24:27 +07:00
dib.rs Check embedded PNG/JPEG bitmap size from the header before decoding (#1716) 2026-10-13 18:17:05 +02:00
emf.rs M4.94: EMF and WMF export from Export As and document.export 2026-10-05 15:24:24 +07:00
import.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
lib.rs Importers: nesting is capped, so a deeply nested file can't overflow the stack 2026-10-14 07:37:52 +07:00
scene.rs Importers: a brush that draws itself by name no longer crashes 2026-10-14 10:13:45 +07:00
tests.rs Symbols: instances of imported symbols are measured by their art 2026-10-14 04:56:30 +07:00
tests_import.rs AI import: groups and nested groups survive 2026-10-08 17:06:57 +07:00
wmf.rs Lint: as_chunks for constant chunk sizes, as clippy 1.99 asks 2026-10-05 12:14:56 -07:00