From fe931be1b1edbc9738727f0793628da93afc405c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Fri, 2 Apr 2021 21:55:01 -0400
Subject: [PATCH] Cap max file size for LLFileSystem to 50mb

---
 indra/llfilesystem/llfilesystem.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index 80f18f55b0f..72024ba3e2f 100644
--- a/indra/llfilesystem/llfilesystem.cpp
+++ b/indra/llfilesystem/llfilesystem.cpp
@@ -256,8 +256,8 @@ S32 LLFileSystem::getSize()
 
 S32 LLFileSystem::getMaxSize()
 {
-    // offer up a huge size since we don't care what the max is
-    return INT_MAX;
+    // Max size at 50mb to avoid error conditions resulting in huge files on disk
+    return 52428800;
 }
 
 BOOL LLFileSystem::rename(const LLUUID& new_id, const LLAssetType::EType new_type)
-- 
GitLab