mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-26 22:55:39 +00:00
Limit ListTags to 1024 elements (#9)
* Limit ListTags to 1024 elements * a
This commit is contained in:
parent
ecfd11a180
commit
d4a73a9b3f
18
patches/server/0025-Limit-ListTags-to-1024-elements.patch
Normal file
18
patches/server/0025-Limit-ListTags-to-1024-elements.patch
Normal file
@ -0,0 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Luna <lunahatesgogle@gmail.com>
|
||||
Date: Fri, 8 Apr 2022 23:38:12 -0300
|
||||
Subject: [PATCH] Limit ListTags to 1024 elements
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/nbt/ListTag.java b/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
index 88bac72edf19c578902f49d20353989ed4d96f8f..6963f2720fcc9888f62f5a1382dd96d82f598ac8 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/ListTag.java
|
||||
@@ -34,6 +34,7 @@ public class ListTag extends CollectionTag<Tag> {
|
||||
list.add(tagType.load(dataInput, i + 1, nbtAccounter));
|
||||
}
|
||||
|
||||
+ if(j > 1024) return new ListTag(Lists.newArrayListWithCapacity(0), b);
|
||||
return new ListTag(list, b);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user