diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-11-24 00:24:29 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-11-24 01:13:04 +0200 |
commit | 317698ff51b92c3953d005dd26e2789258361e8d (patch) | |
tree | 7b00de630cf120301c07d6d83a485411c25a01a5 /indra | |
parent | 98b416ff5c5c5a383ca169faba9201490b189afc (diff) |
SL-16404 Crash in assetRequestCoro
Access violation at writing received data to vfs file. Most crashes indicate network issues, so adding additional response validation.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewerassetstorage.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index 8c8de22b2f..a1377f2aef 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -570,6 +570,18 @@ void LLViewerAssetStorage::assetRequestCoro( result_code = LL_ERR_ASSET_REQUEST_FAILED; ext_status = LLExtStat::NONE; } + else if (!result.has(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW)) + { + LL_DEBUGS("ViewerAsset") << "request failed, no data returned!" << LL_ENDL; + result_code = LL_ERR_ASSET_REQUEST_FAILED; + ext_status = LLExtStat::NONE; + } + else if (!result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].isBinary()) + { + LL_DEBUGS("ViewerAsset") << "request failed, invalid data format!" << LL_ENDL; + result_code = LL_ERR_ASSET_REQUEST_FAILED; + ext_status = LLExtStat::NONE; + } else { LL_DEBUGS("ViewerAsset") << "request succeeded, url " << url << LL_ENDL; |