mirror of https://github.com/grpc/grpc-java.git
Remove size restriction when parsing nano protos
This commit is contained in:
parent
345773504c
commit
76b410de39
|
|
@ -62,6 +62,7 @@ public class NanoUtils {
|
||||||
// TODO(simonma): Investigate whether we can do 0-copy here.
|
// TODO(simonma): Investigate whether we can do 0-copy here.
|
||||||
CodedInputByteBufferNano input =
|
CodedInputByteBufferNano input =
|
||||||
CodedInputByteBufferNano.newInstance(ByteStreams.toByteArray(stream));
|
CodedInputByteBufferNano.newInstance(ByteStreams.toByteArray(stream));
|
||||||
|
input.setSizeLimit(Integer.MAX_VALUE);
|
||||||
return parser.parse(input);
|
return parser.parse(input);
|
||||||
} catch (IOException ipbe) {
|
} catch (IOException ipbe) {
|
||||||
throw Status.INTERNAL.withDescription("Failed parsing nano proto message").withCause(ipbe)
|
throw Status.INTERNAL.withDescription("Failed parsing nano proto message").withCause(ipbe)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue