mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
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.
This commit is contained in:
parent
8ec1f98a2f
commit
d1082ed0d4
@ -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());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user