commit | a39ba7f2946c08fa59dd0928e9c608a70ca52529 | [log] [tgz] |
---|---|---|
author | christianc <christian.ciach@energymeteo.de> | Tue Oct 24 09:25:20 2017 +0200 |
committer | James E. King, III <jking@apache.org> | Wed Oct 25 08:40:51 2017 -0400 |
tree | ae3e059581945260d0c88cc9a152b656462ea978 | |
parent | e7611d0f3ed1704711f58ff45f331db6748dfbb5 [diff] |
THRIFT-4362 check "read length" in readStringBody(int) Client: Java This closes #1398
diff --git a/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java b/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java index d7f8b83..aaa1fd8 100644 --- a/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java +++ b/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java
@@ -373,6 +373,7 @@ } public String readStringBody(int size) throws TException { + checkStringReadLength(size); try { byte[] buf = new byte[size]; trans_.readAll(buf, 0, size);