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.
ProtobufParserdoes not applyStreamReadConstraints.maxDocumentLength— neither for streaming (InputStream) input when reloading its buffer, nor up front for fixedbyte[]input. CBOR and Smile both do (see #649 / [core#1548] for thebyte[]case).Add
validateDocumentLength()calls inloadMore()/_loadToHaveAtLeast()and inProtobufFactory._createParser(..., byte[], int, int), matching the CBOR implementation.