Skip to main content

Module codec

Module codec 

Source

Constants§

MAX_FRAME_LEN
Hard cap on a single frame’s payload (256 MiB). A plugin is an untrusted peer over the wire: the 4-byte length prefix is attacker-controlled and a hostile/buggy plugin could send 0xFFFF_FFFF to make the daemon allocate 4 GiB and OOM. We refuse any frame larger than this before allocating. 256 MiB comfortably exceeds the largest realistic ParseOutput/InvokeResponse.

Functions§

decode_message
encode_message
write_message