Skip to content

read_segment_from_words bounds check overly restrictive #148

Description

@bspeice

Related to #101, but slightly different. When reading in messages from a network buffer (or mmap file in #121), it happens frequently that the message buffer is significantly larger than the message itself. When callingread_message_from_words, there's a length check that errors out in this situation. While I'm happy to pass read_message the correct-size buffer, that requires me to read the segment table to figure out message size, and read_segment_table is private.

To better support streaming use cases, is it possible to either allow the length check to succeed if too many words are supplied, or move read_segment_table to the public API?

Side note: if a decision is made to mark read_segment_table as public, having an additional method to actually calculate message size would be incredibly helpful. I was able to guess and check, but having an approved means would be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions