mirror of
https://github.com/storytold/cadcraft.git
synced 2026-10-31 22:36:51 -06:00
LAYER, LTYPE, STYLE and DIMSTYLE records were appended with no cap while the VIEW, UCS and VPORT arms of the same loop guard at MAX_OBJECTS — so a hostile DXF could grow the layer table (each record found by a linear case-insensitive name scan) without bound. The same guard now applies to all seven table kinds. Behaviour is unchanged for every legal drawing: no drawing approaches a million table records, so no regression test can reach the cap at unit scale (the same reason the peer guards shipped without one). The quadratic cost of the name lookups themselves is a separate, larger change (resolving table names through a map while reading) deliberately left to the maintainers.