From 82e6e42b9ee62af0e39049e3d789457fe1a41281 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 12 Aug 2025 22:13:51 +0300 Subject: #4527 Crash trying to upload a huge image Raw image permits only a 256 MB buffer so this isn't unexpected. --- indra/llimage/llimagedxt.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llimage/llimagedxt.cpp') diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp index 6b960f9077..c3fd0c5aa8 100644 --- a/indra/llimage/llimagedxt.cpp +++ b/indra/llimage/llimagedxt.cpp @@ -329,6 +329,12 @@ bool LLImageDXT::encodeDXT(const LLImageRaw* raw_image, F32 time, bool explicit_ { llassert_always(raw_image); + if (raw_image->isBufferInvalid()) + { + setLastError("Invalid input, no buffer"); + return false; + } + S32 ncomponents = raw_image->getComponents(); EFileFormat format; switch (ncomponents) -- cgit v1.2.3