diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-08-16 06:39:13 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-08-16 06:39:13 +0800 |
commit | 2d8948ef173c5bfc37834301f4aa4fb72e78f03c (patch) | |
tree | 68b8ce2297ec590ac3f5af2e4f34736f15d7e193 /indra/llimagej2coj/llimagej2coj.cpp | |
parent | 977b636f37cd4a53caa1db084c07294f67212c0e (diff) | |
parent | 37a04baf104aa394615d8e8286522988ba56c09d (diff) |
Merge tag 'Second_Life_Release#37a04baf-2025.06' into 2025.06
Diffstat (limited to 'indra/llimagej2coj/llimagej2coj.cpp')
-rw-r--r-- | indra/llimagej2coj/llimagej2coj.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index 717b0a6e86..6ebbe359b9 100644 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -897,6 +897,12 @@ bool LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod bool LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time, bool reversible) { + if (raw_image.isBufferInvalid()) + { + base.setLastError("Invalid input, no buffer"); + return false; + } + JPEG2KEncode encode(comment_text, reversible); bool encoded = encode.encode(raw_image, base); if (!encoded) |