Limit the length of byte arrays

By: Thinkofname <thinkofdeath@spigotmc.org>
This commit is contained in:
CraftBukkit/Spigot
2016-03-28 21:19:05 +01:00
parent 98e7045a09
commit 5e00c79020
2 changed files with 37 additions and 4 deletions

View File

@@ -0,0 +1,15 @@
--- a/net/minecraft/server/PacketLoginInEncryptionBegin.java
+++ b/net/minecraft/server/PacketLoginInEncryptionBegin.java
@@ -12,8 +12,10 @@
public PacketLoginInEncryptionBegin() {}
public void a(PacketDataSerializer packetdataserializer) throws IOException {
- this.a = packetdataserializer.a();
- this.b = packetdataserializer.a();
+ // CraftBukkit start - limit length
+ this.a = packetdataserializer.readByteArray(256);
+ this.b = packetdataserializer.readByteArray(256);
+ // CraftBukkit end
}
public void b(PacketDataSerializer packetdataserializer) throws IOException {