diff options
Diffstat (limited to 'indra/llmessage/llsdmessagereader.cpp')
-rwxr-xr-x | indra/llmessage/llsdmessagereader.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llmessage/llsdmessagereader.cpp b/indra/llmessage/llsdmessagereader.cpp index c47d4b78bc..e699ec9e28 100755 --- a/indra/llmessage/llsdmessagereader.cpp +++ b/indra/llmessage/llsdmessagereader.cpp @@ -108,6 +108,12 @@ void LLSDMessageReader::getBinaryData(const char *block, const char *var, data_size = max_size; } + // Calls to memcpy will fail if data_size is not positive. + // Phoenix 2009-02-27 + if(data_size <= 0) + { + return; + } memcpy(datap, &(data[0]), data_size); } |