From 7f609b12b9d82186852052973d1a11e90eb78ad0 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Sun, 15 Mar 2015 21:38:05 +0000 Subject: SPIGOT-705: Fix possible CME --- nms-patches/Chunk.patch | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'nms-patches/Chunk.patch') 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(); -- cgit v1.2.3