diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-08-12 22:13:51 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-08-13 00:21:28 +0300 |
commit | 82e6e42b9ee62af0e39049e3d789457fe1a41281 (patch) | |
tree | 68c77257c8d33ffa00d9b09bd43ddaf95273fc6d /indra/llkdu/llimagej2ckdu.cpp | |
parent | 922d2324d06326602fdf5770bc555e3e9f90e74b (diff) |
#4527 Crash trying to upload a huge image
Raw image permits only a 256 MB buffer so this isn't unexpected.
Diffstat (limited to 'indra/llkdu/llimagej2ckdu.cpp')
-rw-r--r-- | indra/llkdu/llimagej2ckdu.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index 0d1f2b3006..b824fd8385 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -662,6 +662,12 @@ bool LLImageJ2CKDU::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, co bool vflip = true; bool hflip = false; + if (raw_image.isBufferInvalid()) + { + base.setLastError("Invalid input, no buffer"); + return false; + } + try { // Set up input image files |