[
https://issues.apache.org/jira/browse/AVRO-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077584#comment-18077584
]
ASF subversion and git services commented on AVRO-4241:
-------------------------------------------------------
Commit e15e0d9220519cde5223155b9aade7e7426e46e5 in avro's branch
refs/heads/branch-1.12 from Ismaël Mejía
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=e15e0d9220 ]
AVRO-4241: [Java] BinaryDecoder should verify available bytes before reading
(#3725)
* AVRO-4241: [Java] BinaryDecoder should verify available bytes before reading
Add ensureAvailableBytes() pre-check in readString, readBytes,
readArrayStart, arrayNext, readMapStart, and mapNext to verify the
source has sufficient data before proceeding.
Byte-array-backed sources return an exact remaining count.
Stream-backed sources return buffered bytes plus InputStream.available(),
which is reliable for the finite streams used by DataFileReader and
DataFileStream.
Includes regression tests and updated array/map limit tests.
* AVRO-4241: [Java] Simplify no-op validatioin code and fix possible int
overflow per PR comments
* AVRO-4241: Test the overhead of {@code minBytesPerElement} computation on
GenericDatumReader
Benchmark to measure the overhead of {@code minBytesPerElement} computation
during array/map decoding via {@link GenericDatumReader}. Tests complex, wide,
and recursive schema structures to verify that the per-block schema traversal
cost is acceptable.
> BinaryDecoder should verify available bytes before reading
> ----------------------------------------------------------
>
> Key: AVRO-4241
> URL: https://issues.apache.org/jira/browse/AVRO-4241
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.11.5, 1.12.1
> Reporter: Ismaël Mejía
> Assignee: Ismaël Mejía
> Priority: Blocker
> Labels: pull-request-available
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)