diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 22:01:18 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 22:01:18 +0200 |
| commit | e70fe3a50d43bd5276f80c9f82fcfb2de02109cb (patch) | |
| tree | c35ab61e94d7b93e0e8be63f60c439d3b6a8c4b9 /indra/llprimitive/lldaeloader.cpp | |
| parent | 15861d8dec096de57b0b51fa55a61a199a0f4337 (diff) | |
| parent | 6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff) | |
Merge branch 'master' into DRTVWR-483
# Conflicts:
# indra/newview/llviewermenu.cpp
Diffstat (limited to 'indra/llprimitive/lldaeloader.cpp')
| -rw-r--r-- | indra/llprimitive/lldaeloader.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index dfa29fb539..33e90555fa 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -198,6 +198,17 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa } LLVolumeFace::VertexMapData::PointMap point_map; + + if (idx_stride <= 0 + || (pos_source && pos_offset >= idx_stride) + || (tc_source && tc_offset >= idx_stride) + || (norm_source && norm_offset >= idx_stride)) + { + // 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; + return LLModel::BAD_ELEMENT; + } for (U32 i = 0; i < idx.getCount(); i += idx_stride) { |
