summaryrefslogtreecommitdiff
path: root/indra/llimage/llimagebmp.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-08-16 06:39:13 +0800
committerErik Kundiman <erik@megapahit.org>2025-08-16 06:39:13 +0800
commit2d8948ef173c5bfc37834301f4aa4fb72e78f03c (patch)
tree68b8ce2297ec590ac3f5af2e4f34736f15d7e193 /indra/llimage/llimagebmp.cpp
parent977b636f37cd4a53caa1db084c07294f67212c0e (diff)
parent37a04baf104aa394615d8e8286522988ba56c09d (diff)
Merge tag 'Second_Life_Release#37a04baf-2025.06' into 2025.06
Diffstat (limited to 'indra/llimage/llimagebmp.cpp')
-rw-r--r--indra/llimage/llimagebmp.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llimage/llimagebmp.cpp b/indra/llimage/llimagebmp.cpp
index 2a328675c2..c8f99380ea 100644
--- a/indra/llimage/llimagebmp.cpp
+++ b/indra/llimage/llimagebmp.cpp
@@ -558,6 +558,12 @@ bool LLImageBMP::encode(const LLImageRaw* raw_image, F32 encode_time)
LL_INFOS() << "Dropping alpha information during BMP encoding" << LL_ENDL;
}
+ if (raw_image->isBufferInvalid())
+ {
+ setLastError("Invalid input, no buffer");
+ return false;
+ }
+
setSize(raw_image->getWidth(), raw_image->getHeight(), dst_components);
U8 magic[14];