summaryrefslogtreecommitdiff
path: root/indra/llprimitive/lldaeloader.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-07-29 07:07:29 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-29 07:07:29 +0800
commitcb759bf9e0580b0c0799e33b8e7af1ea46a4c336 (patch)
tree403de432ee5431fdb5195cb21d81b1c0a01cec54 /indra/llprimitive/lldaeloader.cpp
parent2ec9d7fa779456112f36e963d1e169a71149662a (diff)
parent288bce100d1239dd98e1d0730c905cc5cbe6ad1b (diff)
Merge tag 'Second_Life_Release#288bce10-2025.05' into 2025.05
Diffstat (limited to 'indra/llprimitive/lldaeloader.cpp')
-rw-r--r--indra/llprimitive/lldaeloader.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index a11f9b5ca2..bfcd84a43d 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -204,12 +204,15 @@ LLModel::EModelStatus load_face_from_dom_triangles(
if (idx_stride <= 0
|| (pos_source && pos_offset >= idx_stride)
+ || (pos_source && pos_offset < 0)
|| (tc_source && tc_offset >= idx_stride)
- || (norm_source && norm_offset >= idx_stride))
+ || (tc_source && tc_offset < 0)
+ || (norm_source && norm_offset >= idx_stride)
+ || (norm_source && norm_offset < 0))
{
// Looks like these offsets should fit inside idx_stride
// Might be good idea to also check idx.getCount()%idx_stride != 0
- LL_WARNS() << "Invalid pos_offset " << pos_offset << ", tc_offset " << tc_offset << " or norm_offset " << norm_offset << LL_ENDL;
+ LL_WARNS() << "Invalid idx_stride " << idx_stride << ", pos_offset " << pos_offset << ", tc_offset " << tc_offset << " or norm_offset " << norm_offset << LL_ENDL;
return LLModel::BAD_ELEMENT;
}