Skip to content

_encode_variable_length_prefix(..).unwrap() in write_length_encoded #268

Description

@ckeshava

Description

BinarySerializer::write_length_encoded unwraps the result of _encode_variable_length_prefix(&byte_object.len()). When the encoded field's length exceeds MAX_LENGTH_VALUE (918,744 bytes), the helper returns an Err, and the unwrap panics. The source already has // TODO Handle unwrap better.

Location

Impact / Severity

Medium — Panic on large field. A Blob, AccountID list, Memos field, or STArray exceeding 918 KB panics the encoder.

Adversarial Agent Notes

Verdict: ACCEPT.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI TriageIssue reported via AI-assisted analysis; needs human triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions