Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-09 17:50:23 +01:00
Add limitation to NBT data, we'll stick with this for now. I don't see this easily being beaten.
Dieser Commit ist enthalten in:
Ursprung
7c66507960
Commit
4f133366e1
@ -42,6 +42,9 @@ public class PacketUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static CompoundTag readNBT(ByteBuf input) throws IOException {
|
public static CompoundTag readNBT(ByteBuf input) throws IOException {
|
||||||
|
// Default client is limited to 2097152 bytes. (2.09mb)
|
||||||
|
Preconditions.checkArgument(input.readableBytes() <= 2097152, "Cannot read NBT (got %s bytes)", input.readableBytes());
|
||||||
|
|
||||||
int readerIndex = input.readerIndex();
|
int readerIndex = input.readerIndex();
|
||||||
byte b = input.readByte();
|
byte b = input.readByte();
|
||||||
if (b == 0) {
|
if (b == 0) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren