From d1082ed0d4eefdbb11dbf02dd43b4737e6680a0b Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Thu, 18 Sep 2025 10:46:25 +0200 Subject: [PATCH] FIX(client,server): Packets of exactly max size were rejected Due to an off-by-one error in the comparison logic, packets that are exactly the maximum allowed size were rejected. This is now fixed. --- src/MumbleProtocol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MumbleProtocol.cpp b/src/MumbleProtocol.cpp index fbd6ef62b..8b5c297c7 100644 --- a/src/MumbleProtocol.cpp +++ b/src/MumbleProtocol.cpp @@ -300,7 +300,7 @@ namespace Protocol { std::size_t writeSnippet(std::span< const byte > source, std::vector< byte > &destination, std::size_t offset, std::size_t maxPacketSize) { - if (maxPacketSize <= offset + source.size()) { + if (maxPacketSize < offset + source.size()) { qWarning("MumbleProtocol: Buffer overflow while writing snippet. Max buffer size is %zu and required size " "is %zu", maxPacketSize, offset + source.size());