[ 
https://issues.apache.org/jira/browse/AVRO-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077416#comment-18077416
 ] 

ASF subversion and git services commented on AVRO-4241:
-------------------------------------------------------

Commit 2461d88df824a51989c86ca87d4e4918949df1e4 in avro's branch 
refs/heads/AVRO-4241-binarydecoder-verify-available-bytes-before-read from 
Ismaël Mejía
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=2461d88df8 ]

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.


> 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 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to