From 95bc2eac222a12c049b1aef799ac280fa9123af4 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 14 Nov 2021 18:18:59 +0000 Subject: [PATCH] Protocol 1.8: fix plugin message payload read size (#5324) * Read the entire payload of an unhandled vanilla plugin message, remove -1 offset. This was forgotten by #5085 * Fixes #5322 --- src/Protocol/Protocol_1_8.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp index e2e8ca499..4bbf5f93e 100644 --- a/src/Protocol/Protocol_1_8.cpp +++ b/src/Protocol/Protocol_1_8.cpp @@ -2880,7 +2880,7 @@ void cProtocol_1_8_0::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, con // Read the payload and send it through to the clienthandle: ContiguousByteBuffer Message; - VERIFY(a_ByteBuffer.ReadSome(Message, a_ByteBuffer.GetReadableSpace() - 1)); + VERIFY(a_ByteBuffer.ReadSome(Message, a_ByteBuffer.GetReadableSpace())); m_Client->HandlePluginMessage(a_Channel, Message); }