From 1bfefe7b82a097b38a70bee8316afbfb894ba991 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 13 Aug 2021 17:11:10 +0200 Subject: [PATCH] Use correct integer type to avoid overflow in arithmetic expession. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 737a416699..2da203ed67 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4959,7 +4959,7 @@ bool LLAppViewer::initCache() // // Fix integer overflow //const unsigned int disk_cache_bytes = disk_cache_mb * 1024 * 1024; - const uintmax_t disk_cache_bytes = disk_cache_mb * 1024 * 1024; + const uintmax_t disk_cache_bytes = disk_cache_mb * 1024ULL * 1024ULL; const bool enable_cache_debug_info = gSavedSettings.getBOOL("EnableDiskCacheDebugInfo"); bool texture_cache_mismatch = false;