commit | 1590a424cb7a8768b0ae01f2957856b1834dd68d | [log] [tgz] |
---|---|---|
author | Huizhi Lu <5187721+pkuwm@users.noreply.github.com> | Wed Apr 21 10:07:24 2021 +0200 |
committer | Enrico Olivelli <eolivelli@datastax.com> | Wed Apr 21 10:07:24 2021 +0200 |
tree | feacf79093f5d7a45bd1db9cc6a55652041aa8fb | |
parent | c583a6e79654359b5daad5093d1730e370d3b75b [diff] |
ZOOKEEPER-4281: Allow packet of max packet length to be deserialized ### Problem Resolves https://issues.apache.org/jira/browse/ZOOKEEPER-4281 There are sanity checks for packet size when deserializing a packet. One place has the inclusion: len >= packetLen. It rejects to deserialize the bytes that are exactly sized jute.maxbuffer. It's confusing. This check should use ">" so the maxbuffer length packet can still be deserialized, like the other checks. ``` if (len < 0 || len >= packetLen) { throw new IOException("Packet len " + len + " is out of range!"); } ``` ### Solution Change: `len >= packetLen` -> `len > packetLen` ``` if (len < 0 || len > packetLen) { ``` Author: Huizhi Lu <5187721+pkuwm@users.noreply.github.com> Reviewers: Enrico Olivelli <eolivelli@apache.org>, Mohammad Arshad <arshad@apache.org>, Michael Han <hanm@apache.org> Closes #1683 from pkuwm/maxPacketLength
For the latest information about Apache ZooKeeper, please visit our website at:
and our wiki, at:
https://cwiki.apache.org/confluence/display/ZOOKEEPER
Either downloaded from https://zookeeper.apache.org/releases.html or found in zookeeper-assembly/target directory after building the project with maven.
apache-zookeeper-[version].tar.gz Contains all the source files which can be built by running: mvn clean install To generate an aggregated apidocs for zookeeper-server and zookeeper-jute: mvn javadoc:aggregate (generated files will be at target/site/apidocs) apache-zookeeper-[version]-bin.tar.gz Contains all the jar files required to run ZooKeeper Full documentation can also be found in the docs folder
As of version 3.5.5, the parent, zookeeper and zookeeper-jute artifacts are deployed to the central repository after the release is voted on and approved by the Apache ZooKeeper PMC:
https://repo1.maven.org/maven2/org/apache/zookeeper/zookeeper
If you are going to compile with Java 1.8, you should use a recent release at u211 or above.
We always welcome new contributors to the project! See How to Contribute for details on how to submit patch through pull request and our contribution workflow.