What steps will reproduce the problem?
1. Create a CodedInputStream on a System.Stream object.
2. Read a length delimited prefix
2. Call CodedInputStream.PushLimit(0)
3. Position property returns incorrect value
What is the expected output? What do you see instead?
The bufferSizeAfterLimit field should be taken into account when computing the
stream offset.
The following change should be applied to address the issue.
get
{
if (input != null)
- return input.Position - (bufferSize - bufferPos);
+ return input.Position - ((bufferSize + bufferSizeAfterLimit) -
bufferPos);
return bufferPos;
}
Original issue reported on code.google.com by Grig...@gmail.com on 16 May 2013 at 7:28
Original issue reported on code.google.com by
Grig...@gmail.com
on 16 May 2013 at 7:28