From a17d8f8a66844f4beb8b4cec22c9cce9c6503863 Mon Sep 17 00:00:00 2001 From: Outfluencer <48880402+Outfluencer@users.noreply.github.com> Date: Wed, 9 Mar 2022 01:21:07 +0100 Subject: [PATCH] #3264: Negative packet ids are also outside of range --- protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java index 9c8a7118..21f4a5d5 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/Protocol.java @@ -529,7 +529,7 @@ public enum Protocol { throw new BadPacketException( "Unsupported protocol version " + version ); } - if ( id > MAX_PACKET_ID ) + if ( id > MAX_PACKET_ID || id < 0 ) { throw new BadPacketException( "Packet with id " + id + " outside of range" ); }