From 317698ff51b92c3953d005dd26e2789258361e8d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 24 Nov 2021 00:24:29 +0200 Subject: SL-16404 Crash in assetRequestCoro Access violation at writing received data to vfs file. Most crashes indicate network issues, so adding additional response validation. --- indra/newview/llviewerassetstorage.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra') 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; -- cgit v1.2.3