Ignore compressed packets for voice, there is an issue

This commit is contained in:
Manevolent
2018-08-04 23:01:03 -04:00
parent 8f9cc3cdd8
commit 95adfc6e3d
2 changed files with 4 additions and 1 deletions
@@ -21,7 +21,6 @@ import com.github.manevolent.ts3j.protocol.packet.PacketBody2Command;
import com.github.manevolent.ts3j.util.HighPrecisionRecurrentTask; import com.github.manevolent.ts3j.util.HighPrecisionRecurrentTask;
import com.github.manevolent.ts3j.util.Ts3Debugging; import com.github.manevolent.ts3j.util.Ts3Debugging;
import java.io.Closeable;
import java.io.IOException; import java.io.IOException;
import java.net.*; import java.net.*;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
@@ -12,6 +12,8 @@ package com.github.manevolent.ts3j.util;// QuickLZ data compression library
// //
// Version: 1.5.0 final // Version: 1.5.0 final
import java.util.Base64;
public final class QuickLZ public final class QuickLZ
{ {
// Streaming mode not supported // Streaming mode not supported
@@ -310,6 +312,8 @@ public final class QuickLZ
static public byte[] decompress(byte[] source) static public byte[] decompress(byte[] source)
{ {
int size = (int)sizeDecompressed(source); int size = (int)sizeDecompressed(source);
if (size > 65536) throw new IllegalArgumentException("decompression too large: " + size + " (" + Base64.getEncoder().encodeToString(source) + ")");
int src = headerLen(source); int src = headerLen(source);
int dst = 0; int dst = 0;
long cword_val = 1; long cword_val = 1;