Skip to main content

MAX_COLUMN_PAYLOAD_BYTES

Constant MAX_COLUMN_PAYLOAD_BYTES 

Source
pub const MAX_COLUMN_PAYLOAD_BYTES: usize = _; // 268_435_456usize
Expand description

Upper bound on the byte payload accepted by AnyVec::set_from_bytes for a single component column.

Deserialization feeds this length straight into a Vec reservation, so an untrusted scene/pack file could otherwise request an arbitrarily large allocation and abort the process with an OOM. Real component columns are small (transforms, handles, a few scalars per entity); even a million entities of a 256-byte component is 256 MiB, so this ceiling comfortably covers legitimate scenes while rejecting hostile inputs before any allocation happens.