aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ExplodePacket.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-09 04:45:14 -0500
committerLoki Rautio <lokirautio@gmail.com>2026-03-09 04:45:14 -0500
commitd557ca2dfba5ffcca99ceb41b07d149f871964b5 (patch)
tree89ef5bd5fdb2a86fe10a5dead65b65bce8aa0a1d /Minecraft.World/ExplodePacket.cpp
parent0c4f4599045edad935403e4d79d28f6b9aa95833 (diff)
LCEMP RCE fixes
Based on commit d017bfc30a68888bf5c79b23cf5c4f607cf828bf
Diffstat (limited to 'Minecraft.World/ExplodePacket.cpp')
-rw-r--r--Minecraft.World/ExplodePacket.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Minecraft.World/ExplodePacket.cpp b/Minecraft.World/ExplodePacket.cpp
index 07626161..88bf00c6 100644
--- a/Minecraft.World/ExplodePacket.cpp
+++ b/Minecraft.World/ExplodePacket.cpp
@@ -52,6 +52,8 @@ void ExplodePacket::read(DataInputStream *dis) //throws IOException
r = dis->readFloat();
int count = dis->readInt();
+ if (count < 0 || count > 32768) count = 0;
+
int xp = static_cast<int>(x);
int yp = static_cast<int>(y);
int zp = static_cast<int>(z);