Limit the length of byte arrays

This commit is contained in:
Thinkofname
2016-03-28 21:19:05 +01:00
parent 15222c84b4
commit fc9ee90fc5
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 {