FasterXML / FasterXML/jackson-dataformats-binary

(protobuf) Support `StreamReadConstraints.maxDocumentLength` in `ProtobufParser`

Abierto
#783 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
347
Forks
156
Merge medio
3 d 3 h
PR fusionados (30 d)
22

Descripción

`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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.