Skip to main content

MAX_TREE_DEPTH

Constant MAX_TREE_DEPTH 

Source
pub const MAX_TREE_DEPTH: usize = 64;
Expand description

DoS cap for the recursive tree depth.

Protects the recursive build_element call from stack overflow on adversarial deeply-nested XML inputs (TS-1 finding 3, internal/test-harness/plan.md). Realistic DDS-XML profiles go 4-8 deep; even complex <application>/<participant> nestings stay below 32.