kidok / protobuf

Automatically exported from code.google.com/p/protobuf
0 stars 0 forks source link

protoc cannot decode files larger than 67108864 bytes #596

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a protobuf file larger than 67108864 bytes.
2. Run protoc --decode with that file

What is the expected output? What do you see instead?
I expected the file to be decoded into text format, but I see some errors.

Please use labels and text to provide additional information.

The errors are:
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:505] Reading 
dangerously large protocol message.  If the message turns out to be larger than 
67108864 bytes, parsing will be halted for security reasons.  To increase the 
limit (or to disable these warnings), see 
CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
[libprotobuf ERROR google/protobuf/io/coded_stream.cc:171] A protocol message 
was rejected because it was too big (more than 67108864 bytes).  To increase 
the limit (or to disable these warnings), see 
CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of 
bytes read was 67108864
Failed to parse input.

I want an command-line flag to change the limit, instead of modifying the 
source code of protoc and recompiling protoc.

Original issue reported on code.google.com by pop.atry@gmail.com on 14 Jan 2014 at 6:56

GoogleCodeExporter commented 9 years ago
I get "failed to parse input" with a small file too - not just a very large 
one.  Are you having issues with just big files or all files?

Original comment by jrolt...@gmail.com on 29 Jan 2014 at 12:00