aboutsummaryrefslogtreecommitdiff
path: root/protobuf-nano
diff options
context:
space:
mode:
authorXudong Ma <simonma@google.com>2015-08-24 10:53:52 -0700
committerXudong Ma <simonma@google.com>2015-08-24 13:32:17 -0700
commit76b410de395cb095959484ecd38634874b0a0898 (patch)
treea3e889aa2ed51ce89f5045c7516e18edc6e45f03 /protobuf-nano
parent345773504c24e3e52b1b1e586ad8e509ac53425c (diff)
downloadgrpc-grpc-java-76b410de395cb095959484ecd38634874b0a0898.tar.gz
Remove size restriction when parsing nano protos
Diffstat (limited to 'protobuf-nano')
-rw-r--r--protobuf-nano/src/main/java/io/grpc/protobuf/nano/NanoUtils.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/protobuf-nano/src/main/java/io/grpc/protobuf/nano/NanoUtils.java b/protobuf-nano/src/main/java/io/grpc/protobuf/nano/NanoUtils.java
index 300f50c52..9375fc8df 100644
--- a/protobuf-nano/src/main/java/io/grpc/protobuf/nano/NanoUtils.java
+++ b/protobuf-nano/src/main/java/io/grpc/protobuf/nano/NanoUtils.java
@@ -62,6 +62,7 @@ public class NanoUtils {
// TODO(simonma): Investigate whether we can do 0-copy here.
CodedInputByteBufferNano input =
CodedInputByteBufferNano.newInstance(ByteStreams.toByteArray(stream));
+ input.setSizeLimit(Integer.MAX_VALUE);
return parser.parse(input);
} catch (IOException ipbe) {
throw Status.INTERNAL.withDescription("Failed parsing nano proto message").withCause(ipbe)