netty5/buffer
Karas Lukáš f5d5039bed Fix setBytes when source is read-only ByteBuffer and target is pooled buffer
Motivation:

The method setBytes creates temporary heap buffer when source buffer is read-only.
But this temporary buffer is not used correctly and may lead to data corruption.
This problem occurs when target buffer is pooled and temporary buffer
arrayOffset() is not zero.

Modifications:

Use correct arrayOffset when calling PlatformDependent.copyMemory.
Unit test was added to test this case.

Result:

Setting buffer content works correctly when target is pooled buffer and source
is read-only ByteBuffer.
2016-03-22 09:19:39 +01:00
..
src Fix setBytes when source is read-only ByteBuffer and target is pooled buffer 2016-03-22 09:19:39 +01:00
pom.xml [maven-release-plugin] prepare for next development iteration 2016-03-21 10:34:26 +01:00