diff options
Diffstat (limited to 'linden/indra/llmessage/llsdmessagereader.cpp')
-rwxr-xr-x | linden/indra/llmessage/llsdmessagereader.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/linden/indra/llmessage/llsdmessagereader.cpp b/linden/indra/llmessage/llsdmessagereader.cpp index 2cf74e8..e699ec9 100755 --- a/linden/indra/llmessage/llsdmessagereader.cpp +++ b/linden/indra/llmessage/llsdmessagereader.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -107,6 +108,12 @@ void LLSDMessageReader::getBinaryData(const char *block, const char *var, | |||
107 | data_size = max_size; | 108 | data_size = max_size; |
108 | } | 109 | } |
109 | 110 | ||
111 | // Calls to memcpy will fail if data_size is not positive. | ||
112 | // Phoenix 2009-02-27 | ||
113 | if(data_size <= 0) | ||
114 | { | ||
115 | return; | ||
116 | } | ||
110 | memcpy(datap, &(data[0]), data_size); | 117 | memcpy(datap, &(data[0]), data_size); |
111 | } | 118 | } |
112 | 119 | ||