Files
photocraft/crates/affinity/src
Dylan M. Taylor 5adebc5d6d security(affinity): index object fields for O(1) lookup
Object::get scanned the field vector linearly. An Affinity file can
define one large shared object and reference it repeatedly as sibling
layers, so repeated property lookups multiplied into quadratic CPU work
without the fields appearing more than once in the file.

Build a first-occurrence tag index when an object's fields are set
(via Object::new and set_fields, the latter covering the root object
that is filled after it is pushed). Positional fields (tag 0) stay out
of the index, and first-match semantics are preserved.

Finding: c315c4b0-dceb-459e-b39a-fa9c68ae6f40 (CWE-407)
2026-10-22 07:11:24 -04:00
..