diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-11-16 16:15:41 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-11-16 16:15:41 -0600 |
commit | d21c5f387111ba4f1fbc3420ce8d0f9da00e32c5 (patch) | |
tree | 068bac9d8c246a7ffd19150db1ca7962812296a5 | |
parent | 6466aa1d257ba9395b0e02011f08e1f4b3777407 (diff) | |
download | craftbukkit-d21c5f387111ba4f1fbc3420ce8d0f9da00e32c5.tar craftbukkit-d21c5f387111ba4f1fbc3420ce8d0f9da00e32c5.tar.gz craftbukkit-d21c5f387111ba4f1fbc3420ce8d0f9da00e32c5.tar.lz craftbukkit-d21c5f387111ba4f1fbc3420ce8d0f9da00e32c5.tar.xz craftbukkit-d21c5f387111ba4f1fbc3420ce8d0f9da00e32c5.zip |
Ignore empty custom payload packets. Fixes BUKKIT-2957
-rw-r--r-- | src/main/java/net/minecraft/server/NetServerHandler.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 86b6ad1c..831ad7ed 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -1458,6 +1458,12 @@ public class NetServerHandler extends NetHandler { ItemStack itemstack; ItemStack itemstack1; + // CraftBukkit start - ignore empty payloads + if (packet250custompayload.length <= 0) { + return; + } + // CraftBukkit end + if ("MC|BEdit".equals(packet250custompayload.tag)) { try { datainputstream = new DataInputStream(new ByteArrayInputStream(packet250custompayload.data)); |