FasterXML / FasterXML/jackson-dataformats-binary

(avro) Support `StreamReadConstraints.maxDocumentLength` and `maxTokenCount` in Avro parser

Abierto
#785 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

Two `StreamReadConstraints` settings are ignored by the Avro backend:

**`maxTokenCount`**: `AvroParserImpl.nextToken()` (and `nextNameMatch()`) assign `_currToken` directly instead of going through `ParserMinimalBase._updateToken()` / `_nullSafeUpdateToken()`, so tokens are never counted — `currentTokenCount()` stays 0 and the limit is never enforced. Only the `nextName()` variants count.

**`maxDocumentLength`**: no `validateDocumentLength()` calls anywhere — neither in `JacksonAvroParserImpl`'s buffer reloads, nor up front for `byte[]` input in `AvroFactory`, nor for the Apache-decoder path (`ApacheAvroParserImpl`), which reads from the `InputStream` directly.

CBOR and Smile support both (see #649, #651).

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.