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
8fce6316ad
commit
073ec8d10a
@ -147,7 +147,7 @@ public class LzfDecoder extends ByteToMessageDecoder {
|
||||
|
||||
ByteBuf uncompressed = ctx.alloc().heapBuffer(originalLength, originalLength);
|
||||
final byte[] outputArray = uncompressed.array();
|
||||
final int outPos = uncompressed.arrayOffset();
|
||||
final int outPos = uncompressed.arrayOffset() + uncompressed.writerIndex();
|
||||
|
||||
boolean success = false;
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user