#3775: Allow decompressed packets to grow to max capacity
Do not use size as max capacity, as its possible that the entity rewriter increases the size afterwards. This would result in a kick (it happens rarely as the entity ids size must differ).
This commit is contained in:
parent
6b22690971
commit
4fded9828f
@ -41,7 +41,9 @@ public class PacketDecompressor extends MessageToMessageDecoder<ByteBuf>
|
||||
throw new OverflowPacketException( "Packet may not be larger than " + MAX_DECOMPRESSED_LEN + " bytes" );
|
||||
}
|
||||
|
||||
ByteBuf decompressed = ctx.alloc().directBuffer( size, size );
|
||||
// Do not use size as max capacity, as its possible that the entity rewriter increases the size afterwards
|
||||
// This would result in a kick (it happens rarely as the entity ids size must differ)
|
||||
ByteBuf decompressed = ctx.alloc().directBuffer( size, MAX_DECOMPRESSED_LEN );
|
||||
try
|
||||
{
|
||||
zlib.process( in, decompressed );
|
||||
|
Loading…
Reference in New Issue
Block a user