mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 10:06:11 +03:00
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
From 301d4e677703bfe3396849129f60372bfaee7c5c Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Sun, 27 Jul 2014 20:46:04 +1000
|
|
Subject: [PATCH] Apply NBTReadLimiter to more things.
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/nbt/NBTCompressedStreamTools.java b/src/main/java/net/minecraft/nbt/NBTCompressedStreamTools.java
|
|
index 392598dce..438b56859 100644
|
|
--- a/src/main/java/net/minecraft/nbt/NBTCompressedStreamTools.java
|
|
+++ b/src/main/java/net/minecraft/nbt/NBTCompressedStreamTools.java
|
|
@@ -229,6 +229,12 @@ public class NBTCompressedStreamTools {
|
|
}
|
|
|
|
public static NBTTagCompound read(DataInput datainput, NBTReadLimiter nbtreadlimiter) throws IOException {
|
|
+ // Spigot start
|
|
+ if ( datainput instanceof io.netty.buffer.ByteBufInputStream )
|
|
+ {
|
|
+ datainput = new DataInputStream(new org.spigotmc.LimitStream((InputStream) datainput, nbtreadlimiter));
|
|
+ }
|
|
+ // Spigot end
|
|
NBTBase nbtbase = readUnnamedTag(datainput, 0, nbtreadlimiter);
|
|
|
|
if (nbtbase instanceof NBTTagCompound) {
|
|
--
|
|
2.25.1
|
|
|