geforkt von Mirrors/Paper
Fix Varint21FrameDecoder cached length buf usage
Dieser Commit ist enthalten in:
Ursprung
944be7b031
Commit
3c0aa837c1
@ -34,13 +34,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ // Paper end
|
||||
byteBuf.markReaderIndex();
|
||||
- byte[] bs = new byte[3];
|
||||
+ // Paper start - reuse temporary length buffer
|
||||
+ byte[] abyte = lenBuf;
|
||||
+ java.util.Arrays.fill(abyte, (byte) 0);
|
||||
+ byte[] bs = lenBuf;
|
||||
+ java.util.Arrays.fill(bs, (byte) 0);
|
||||
+ // Paper end
|
||||
byte[] bs = new byte[3];
|
||||
|
||||
for(int i = 0; i < bs.length; ++i) {
|
||||
if (!byteBuf.isReadable()) {
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren