iemejia commented on code in PR #3865:
URL: https://github.com/apache/avro/pull/3865#discussion_r3567559158
##########
lang/java/avro/src/main/java/org/apache/avro/io/BinaryDecoder.java:
##########
@@ -408,8 +408,16 @@ protected void doReadBytes(byte[] bytes, int start, int
length) throws IOExcepti
protected long doReadItemCount() throws IOException {
long result = readLong();
if (result < 0L) {
- // Consume byte-count if present
+ // A negative block count is followed by a block byte-size; consume it.
readLong();
+ if (result == Long.MIN_VALUE) {
Review Comment:
Fixed — doReadItemCount now reads the block byte-size into a variable and
rejects a negative value, matching doSkipItems.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]