Skip to main content

parse_instruction_frame_checked

Function parse_instruction_frame_checked 

Source
pub fn parse_instruction_frame_checked(
    buf: &[u8],
) -> Result<FrameInfo, FrameError>
Expand description

Parse a loader-input byte buffer with full bounds checking.

This is the safe companion to scan_instruction_frame / deserialize_accounts. It returns Err (never panics, never reads out of bounds) for any malformed or truncated input, and preserves the exact same forward-duplicate-marker rejection rule that the pointer parser uses (see malformed_duplicate_marker).

Off-chain tools, fuzz harnesses, and RPC decoders should prefer this function. On-chain entrypoints continue to use the pointer parser for zero-overhead access.