summaryrefslogtreecommitdiffstats
path: root/nms-patches/Chunk.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2015-03-15 21:38:05 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2015-03-15 21:38:05 +0000
commit7f609b12b9d82186852052973d1a11e90eb78ad0 (patch)
treec5545aa81dbeca32c854a65847c7b69ce93562c8 /nms-patches/Chunk.patch
parent6a374be73752b0d6317ac6e1dfdf1cea312cbacd (diff)
downloadcraftbukkit-7f609b12b9d82186852052973d1a11e90eb78ad0.tar
craftbukkit-7f609b12b9d82186852052973d1a11e90eb78ad0.tar.gz
craftbukkit-7f609b12b9d82186852052973d1a11e90eb78ad0.tar.lz
craftbukkit-7f609b12b9d82186852052973d1a11e90eb78ad0.tar.xz
craftbukkit-7f609b12b9d82186852052973d1a11e90eb78ad0.zip
SPIGOT-705: Fix possible CME
Diffstat (limited to 'nms-patches/Chunk.patch')
-rw-r--r--nms-patches/Chunk.patch24
1 files changed, 16 insertions, 8 deletions
diff --git a/nms-patches/Chunk.patch b/nms-patches/Chunk.patch
index 720b6155..e78d136c 100644
--- a/nms-patches/Chunk.patch
+++ b/nms-patches/Chunk.patch
@@ -1,5 +1,5 @@
---- /home/matt/mc-dev-private//net/minecraft/server/Chunk.java 2015-02-26 22:40:22.311608142 +0000
-+++ src/main/java/net/minecraft/server/Chunk.java 2015-02-26 22:40:22.315608142 +0000
+--- /home/matt/mc-dev-private//net/minecraft/server/Chunk.java 2015-03-15 21:30:40.204367362 +0000
++++ src/main/java/net/minecraft/server/Chunk.java 2015-03-15 21:30:40.216367361 +0000
@@ -14,6 +14,9 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -63,7 +63,15 @@
public Chunk(World world, int i, int j) {
this.sections = new ChunkSection[16];
this.e = new byte[256];
-@@ -60,8 +91,17 @@
+@@ -54,14 +85,25 @@
+ this.locZ = j;
+ this.heightMap = new int[256];
+
++ /* CraftBukkit start
+ for (int k = 0; k < this.entitySlices.length; ++k) {
+ this.entitySlices[k] = new EntitySlice(Entity.class);
+ }
++ // CraftBukkit end */
Arrays.fill(this.f, -999);
Arrays.fill(this.e, (byte) -1);
@@ -81,7 +89,7 @@
public Chunk(World world, ChunkSnapshot chunksnapshot, int i, int j) {
this(world, i, j);
short short0 = 256;
-@@ -529,7 +569,8 @@
+@@ -529,7 +571,8 @@
}
}
@@ -91,7 +99,7 @@
block.onPlace(this.world, blockposition, iblockdata);
}
-@@ -610,7 +651,11 @@
+@@ -610,7 +653,11 @@
int j = MathHelper.floor(entity.locZ / 16.0D);
if (i != this.locX || j != this.locZ) {
@@ -104,7 +112,7 @@
entity.die();
}
-@@ -697,6 +742,13 @@
+@@ -697,6 +744,13 @@
tileentity.D();
this.tileEntities.put(blockposition, tileentity);
@@ -118,7 +126,7 @@
}
}
-@@ -740,7 +792,21 @@
+@@ -740,7 +794,21 @@
}
for (int i = 0; i < this.entitySlices.length; ++i) {
@@ -141,7 +149,7 @@
}
}
-@@ -798,8 +864,8 @@
+@@ -798,8 +866,8 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();