未验证 提交 4d3ed115 编写于 作者: F Fankux 提交者: GitHub

fix v2 protocol lz4 decompress (#33)

correct length of output bytes of decompress action
上级 717f4220
......@@ -275,9 +275,9 @@ public class ClientHandler extends ChannelInboundHandlerAdapter {
int rawLen = recordData.getRawLen();
byte[] rawData = recordData.getRecords().toByteArray();
if (compressType == CompressType.LZ4.code()) {
byte[] bytes = new byte[compressedLen];
int decompress = fastDecompressor.decompress(rawData, 0, bytes, 0, compressedLen);
if (decompress != rawLen) {
byte[] bytes = new byte[rawLen];
int decompress = fastDecompressor.decompress(rawData, 0, bytes, 0, rawLen);
if (decompress != compressedLen) {
throw new LogProxyClientException(
ErrorCode.E_LEN,
"decompressed length ["
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册