diff --git a/src/TextPacket.php b/src/TextPacket.php index a1d8e7fe..4e399115 100644 --- a/src/TextPacket.php +++ b/src/TextPacket.php @@ -117,6 +117,9 @@ protected function decodePayload(PacketSerializer $in) : void{ case self::TYPE_JUKEBOX_POPUP: $this->message = $in->getString(); $count = $in->getUnsignedVarInt(); + if ($count > 5){ + throw new PacketDecodeException("Too many TextPacket::TYPE_JUKEBOX_POPUP"); + } for($i = 0; $i < $count; ++$i){ $this->parameters[] = $in->getString(); }