jklamer commented on code in PR #2210:
URL: https://github.com/apache/avro/pull/2210#discussion_r1191477261


##########
lang/java/avro/src/main/java/org/apache/avro/io/BinaryDecoder.java:
##########
@@ -329,9 +329,10 @@ public void skipString() throws IOException {
 
   @Override
   public ByteBuffer readBytes(ByteBuffer old) throws IOException {
-    int length = readInt();
+    long length = readLong();

Review Comment:
   My understanding is that this is checked in anywhere that has a serde cycle 
with a bytes type. A good example being:
   `org.apache.avro.io.TestBinaryDecoder` which reads random data with a bytes 
field inside a record. Which does the serde cycle used above. 
   
   If we want to test the underlying algorithm implementation which should 
always allow writeInt to be read by readLong, I can modify the test I have 
already made although I believe it would be logically equivalent in its 
guarantees. 



-- 
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]

Reply via email to