Consider writerIndex when LzfDecoder writes into a new heap buffer
Motivation: Now LzfDecoder do not consider writerIndex when it writes into array of a new heap buffer (when it decodes a compressed chuck of data)
This commit is contained in:
parent
e59ec5384d
commit
12c614a7eb
@ -147,7 +147,7 @@ public class LzfDecoder extends ByteToMessageDecoder {
|
|||||||
|
|
||||||
ByteBuf uncompressed = ctx.alloc().heapBuffer(originalLength, originalLength);
|
ByteBuf uncompressed = ctx.alloc().heapBuffer(originalLength, originalLength);
|
||||||
final byte[] outputArray = uncompressed.array();
|
final byte[] outputArray = uncompressed.array();
|
||||||
final int outPos = uncompressed.arrayOffset();
|
final int outPos = uncompressed.arrayOffset() + uncompressed.writerIndex();
|
||||||
|
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user