summaryrefslogtreecommitdiff
path: root/indra/llmessage/lldatapacker.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-05-06 16:40:12 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-05-06 16:40:12 -0700
commit4af9128db1fb65ff99d1e8086352698f46e049b4 (patch)
tree4b98d8afb138a4a1ac9f2d4b01a7d83dce314d17 /indra/llmessage/lldatapacker.cpp
parent05b2dd913fcb1c5485ce19885e4e60f26752e6b0 (diff)
parent10aa7f4254fd04c24f15f507188705146f92ee60 (diff)
Merge branch 'main' of https://github.com/secondlife/viewer into roxie/webrtc-voice
Diffstat (limited to 'indra/llmessage/lldatapacker.cpp')
-rw-r--r--indra/llmessage/lldatapacker.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp
index 9f7768f78e..b7013dbb6e 100644
--- a/indra/llmessage/lldatapacker.cpp
+++ b/indra/llmessage/lldatapacker.cpp
@@ -298,6 +298,13 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char
}
htolememcpy(&size, mCurBufferp, MVT_S32, 4);
+
+ if (size < 0)
+ {
+ LL_WARNS() << "LLDataPackerBinaryBuffer::unpackBinaryData unpacked invalid size, aborting!" << LL_ENDL;
+ return FALSE;
+ }
+
mCurBufferp += 4;
if (!verifyLength(size, name))