Skip to content

Support StreamReadConstraints.maxDocumentLength in ProtobufParser #783

Description

@pjfanning

ProtobufParser does not apply StreamReadConstraints.maxDocumentLength — neither for streaming (InputStream) input when reloading its buffer, nor up front for fixed byte[] input. CBOR and Smile both do (see #649 / [core#1548] for the byte[] case).

Add validateDocumentLength() calls in loadMore() / _loadToHaveAtLeast() and in ProtobufFactory._createParser(..., byte[], int, int), matching the CBOR implementation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions