CodedInput#skipRawBytes() fails some times for streamed parsing
GoogleCodeExporter opened this issue · comments
I have attached a small maven project containing a sample protobuf object as
well as a test that shows a case where the CodedInput fails to parse a message.
This bug will always happen if the message contains a field not known to the
schema which will try to skip it and the skipped amount of bytes exceeds the
currently loaded amount of bytes in the buffer.
I was able to fix the issue by changing line 925 of the CodedInput (version
1.0.7) as follows:
-totalBytesRetired += pos;
+totalBytesRetired += bufferSize;
Please let me know if you need further information.
Original issue reported on code.google.com by chri...@gmx.de
on 11 Sep 2013 at 5:57
- Merged into: #138
Attachments:
Tried it with 1.0.8-SNAPSHOT and it was already fixed from issue 138.
The thing that sucks is that I haven't release 1.0.8. (bad maintainer = me)
Sorry for the trouble.
Original comment by david.yu...@gmail.com
on 11 Sep 2013 at 6:28
- Changed state: Duplicate
Ah ok cool - I just scanned the open tickets for a duplicate and overlooked the
fixed ones ...
Original comment by chri...@gmx.de
on 11 Sep 2013 at 6:59