Skip to main content

MAX_VALUE_DEPTH

Constant MAX_VALUE_DEPTH 

Source
pub const MAX_VALUE_DEPTH: usize = 64;
Expand description

Maximum <array>/<struct>/<value> nesting accepted from a client.

The parser is iterative, so parsing a deep document cannot overflow the stack — but the XmlRpcValue it returns is recursive, and the request path walks it recursively (actions::create_method_call_event converts it to JSON for the model, and Drop recurses). Without this cap a 4 MiB body is a value ~100 000 deep, and 16 000 levels already overflow an 8 MiB stack: fuzz/fuzz_targets/xmlrpc_value.rs’s depth_bomb seed SIGSEGVs with the check disabled. It also bounds the parser’s own container stack.