mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 22:22:18 -07:00
Limit the length of byte arrays
This commit is contained in:
15
nms-patches/PacketLoginInEncryptionBegin.patch
Normal file
15
nms-patches/PacketLoginInEncryptionBegin.patch
Normal 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 {
|
Reference in New Issue
Block a user