diff options
| author | Graham Linden <graham@lindenlab.com> | 2019-05-08 17:38:13 -0700 |
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2019-05-08 17:38:13 -0700 |
| commit | cd6044ed7a52e68e6050130ac2e9a637b8b7f339 (patch) | |
| tree | 2295f1b2afce6815aec4b80ff447d65de31a67b4 /indra/newview/llimprocessing.cpp | |
| parent | 22fc3409f4606459c6df219c343a002fc53a35cd (diff) | |
| parent | 42fa05bd4cd8d587af4c216faca5e8c010812c8b (diff) | |
Merge viewer-release 6.2.2
Diffstat (limited to 'indra/newview/llimprocessing.cpp')
| -rw-r--r-- | indra/newview/llimprocessing.cpp | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index e76b3d118e..d59c301210 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -854,15 +854,33 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, } else // IM_TASK_INVENTORY_OFFERED { - if (sizeof(S8) != binary_bucket_size) + if (offline == IM_OFFLINE && session_id.isNull() && aux_id.notNull() && binary_bucket_size > sizeof(S8)* 5) { - LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL; - delete info; - break; + // cap received offline message + std::string str_bucket = ll_safe_string((char*)binary_bucket, binary_bucket_size); + typedef boost::tokenizer<boost::char_separator<char> > tokenizer; + boost::char_separator<char> sep("|", "", boost::keep_empty_tokens); + tokenizer tokens(str_bucket, sep); + tokenizer::iterator iter = tokens.begin(); + + info->mType = (LLAssetType::EType)(atoi((*(iter++)).c_str())); + // Note There is more elements in 'tokens' ... + + info->mObjectID = LLUUID::null; + info->mFromObject = TRUE; + } + else + { + if (sizeof(S8) != binary_bucket_size) + { + LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL; + delete info; + break; + } + info->mType = (LLAssetType::EType) binary_bucket[0]; + info->mObjectID = LLUUID::null; + info->mFromObject = TRUE; } - info->mType = (LLAssetType::EType) binary_bucket[0]; - info->mObjectID = LLUUID::null; - info->mFromObject = TRUE; } info->mIM = dialog; |
