mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-1205. java: port server unduly fragile with arbitrary input
Increase the default max frame size to 16MB. Patch: Ryan King git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1156731 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1121b47c09
commit
dfffdd8726
@ -59,9 +59,9 @@ public class TFastFramedTransport extends TTransport {
|
||||
*/
|
||||
public static final int DEFAULT_BUF_CAPACITY = 1024;
|
||||
/**
|
||||
* How big is the largest allowable frame? Defaults to Integer.MAX_VALUE.
|
||||
* How big is the largest allowable frame? Defaults to 16MB.
|
||||
*/
|
||||
public static final int DEFAULT_MAX_LENGTH = Integer.MAX_VALUE;
|
||||
public static final int DEFAULT_MAX_LENGTH = 16384000;
|
||||
|
||||
private final TTransport underlying;
|
||||
private final AutoExpandingBufferWriteTransport writeBuffer;
|
||||
|
@ -27,7 +27,7 @@ import org.apache.thrift.TByteArrayOutputStream;
|
||||
*/
|
||||
public class TFramedTransport extends TTransport {
|
||||
|
||||
protected static final int DEFAULT_MAX_LENGTH = 0x7FFFFFFF;
|
||||
protected static final int DEFAULT_MAX_LENGTH = 16384000;
|
||||
|
||||
private int maxLength_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user