diff options
| author | Beq <beqjanus@gmail.com> | 2024-04-16 10:19:56 +0100 | 
|---|---|---|
| committer | Beq <beqjanus@gmail.com> | 2024-04-16 10:19:56 +0100 | 
| commit | 655b35afffb86bb2bafeecb932f07e3fb40a119a (patch) | |
| tree | 5f11add0c8967aab8f155394df1c94d857df7941 /indra | |
| parent | 291c1ad91b4fb5793cdfd85763df7d3b419a6ac3 (diff) | |
Add some checking around extras cache versionNumber
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llvocache.cpp | 12 | 
1 files changed, 11 insertions, 1 deletions
| diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index d0ae8e9399..4ba6024166 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -1602,8 +1602,18 @@ void LLVOCache::readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCac      {          std::string versionStr = line.substr(LLGLTFOverrideCacheEntry::VERSION_LABEL.length()+1); // skip the version label and ':'          versionNumber = std::stol(versionStr); -        std::getline(in, line); // read the next line for the region UUID check      } +    // For future versions we may call a legacy handler here, but realistically we'll just consider this cache out of date. +    // The important thing is to make sure it gets removed. +    if(versionNumber != LLGLTFOverrideCacheEntry::VERSION && versionNumber != 0) +    { +        LL_WARNS << "Unexpected version number " << versionNumber << " for extras cache for handle " << handle << LL_ENDL; +        in.close(); +        removeGenericExtrasForHandle(handle); +        return; +    } + +    LL_DEBUGS("VOCache") << "Reading extras cache for handle " << handle << ", version " << versionNumber << LL_ENDL;      if(!LLUUID::validate(line))      { | 
