From d0745acde1a137b97624b26e893dbc55f59fb582 Mon Sep 17 00:00:00 2001 From: Leymooo Date: Sat, 22 Jun 2019 14:11:47 +0300 Subject: [PATCH 1/2] 1.14.3-pre4 --- README.md | 2 +- .../java/com/velocitypowered/api/network/ProtocolVersion.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a1358c3fd..ad509b865 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Velocity is currently in beta. Production networks are successfully running Velocity with many hundreds of concurrent players online, but your mileage may vary. -Velocity supports Minecraft 1.8-1.14.2. Velocity is best supported with Paper +Velocity supports Minecraft 1.8-1.14.3-pre4. Velocity is best supported with Paper and SpongeVanilla. Minecraft Forge is fully supported but mod compatibility may vary. Generally, Velocity will support many mods better than BungeeCord or Waterfall do but compatibility can not always be ensured. diff --git a/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java b/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java index 268e3a99c..e51325cc5 100644 --- a/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java +++ b/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java @@ -29,7 +29,8 @@ public enum ProtocolVersion { MINECRAFT_1_13_2(404, "1.13.2"), MINECRAFT_1_14(477, "1.14"), MINECRAFT_1_14_1(480, "1.14.1"), - MINECRAFT_1_14_2(485, "1.14.2"); + MINECRAFT_1_14_2(485, "1.14.2"), + MINECRAFT_1_14_3(489, "1.14.3-pre4"); private final int protocol; private final String name; From 5a209a098cb043e918a7505aaa93647613270e4b Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sat, 22 Jun 2019 16:03:50 -0400 Subject: [PATCH 2/2] Fix memory leak in NativeVelocityCipher --- .../natives/encryption/NativeVelocityCipher.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/native/src/main/java/com/velocitypowered/natives/encryption/NativeVelocityCipher.java b/native/src/main/java/com/velocitypowered/natives/encryption/NativeVelocityCipher.java index b6a27a7c8..b65501ff0 100644 --- a/native/src/main/java/com/velocitypowered/natives/encryption/NativeVelocityCipher.java +++ b/native/src/main/java/com/velocitypowered/natives/encryption/NativeVelocityCipher.java @@ -56,11 +56,16 @@ public class NativeVelocityCipher implements VelocityCipher { int len = source.readableBytes(); ByteBuf out = ctx.alloc().directBuffer(len); - impl.process(this.ctx, source.memoryAddress() + source.readerIndex(), len, - out.memoryAddress(), encrypt); - source.skipBytes(len); - out.writerIndex(len); - return out; + try { + impl.process(this.ctx, source.memoryAddress() + source.readerIndex(), len, + out.memoryAddress(), encrypt); + source.skipBytes(len); + out.writerIndex(len); + return out; + } catch (Exception e) { + out.release(); + throw e; + } } @Override