From 76b410de395cb095959484ecd38634874b0a0898 Mon Sep 17 00:00:00 2001 From: Xudong Ma Date: Mon, 24 Aug 2015 10:53:52 -0700 Subject: [PATCH] Remove size restriction when parsing nano protos --- protobuf-nano/src/main/java/io/grpc/protobuf/nano/NanoUtils.java | 1 + 1 file changed, 1 insertion(+) 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 300f50c522..9375fc8df9 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)