diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-04-25 21:31:43 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-04-25 23:01:01 +0300 |
commit | 8665cd3750767cf47246d1b89b8a668bc4dd4138 (patch) | |
tree | 8781f88a90f50bed705aacf238d59f43bffa74b2 | |
parent | 17e974689c76a2b76cf27e3a1c9dde371f4f877f (diff) |
#3986 Packet ring crash in memcpy
packet_size was negative
-rw-r--r-- | indra/llmessage/llpacketring.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index eb6650c6c5..b8284334ea 100644 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp @@ -209,8 +209,14 @@ S32 LLPacketRing::receiveOrDropBufferedPacket(char *datap, bool drop) if (!drop) { - assert(packet_size > 0); - memcpy(datap, packet->getData(), packet_size); + if (packet_size > 0) + { + memcpy(datap, packet->getData(), packet_size); + } + else + { + assert(false); + } } else { |