Skip to main content

MAX_AMF0_DEPTH

Constant MAX_AMF0_DEPTH 

Source
pub const MAX_AMF0_DEPTH: usize = 32;
Expand description

Maximum AMF0 container nesting depth (Object/ECMA Array/Strict Array) Amf0Value::parse will descend into. Bounds recursion so a pathologically nested input returns RtmpError::Unsupported instead of overflowing the native call stack — the guard is checked on entering each nested container, so recursion never actually reaches an attacker-chosen depth, only this constant.