bitmorse / protobuf-embedded-c

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

Unpacking can write out of bounds for arrays and strings #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate binary .proto buffer with more elements than MAX_REPEATED_LEN in 
array
2. Unpack the binary buffer in the generated .c code
3. The code will write out of the array bounds. 

What is the expected output? What do you see instead?
The expected outcome would be some kind of error to be reported and the 
unpacking to stop. Instead the code destroys the memory in the application. 

Same thing with strings longer than MAX_STRING_LEN. 

What version of the product are you using? On what operating system?
1.0M2 on windows. 

Please provide any additional information below.

Original issue reported on code.google.com by anderssa...@yahoo.se on 26 Mar 2013 at 8:33