Closed cyraxx closed 1 month ago
Thank you for reporting the issue! Definitely looks like this should not be happening. I will get to fixing it promptly and include it as 4.1.1 patch release. I will also include your minimal reproduction as a test case so we do not see it reappear as a regression.
BufferWriter.writeSlice()
callsunwrapBuffer()
to get its own view of the underlying buffer. However, this only takes into account thebyteOffset
and not thebyteLength
. So it always creates its view all the way to the end of the underlying buffer.Example to reproduce the issue:
This will show that 1990 bytes have been written to the output instead of just 100.