Github user afine commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/412#discussion_r147811470
--- Diff: src/java/main/org/apache/jute/BinaryOutputArchive.java ---
@@ -115,6 +115,11 @@ public void writeBuffer(byte barr[], String tag)
out.writeInt(-1);
return;
}
+ if (barr.length >= BinaryInputArchive.maxBuffer) {
--- End diff --
I'm not sure how valid this check is. The output buffer could contain other
data that makes it larger than the maxBuffer even if barr is small right?
Wouldn't it make more sense to track how much data has been written to "out"?
---