summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRuslan Teliuk <ruslantproductengine@lindenlab.com>2018-05-22 15:22:17 +0000
committerRuslan Teliuk <ruslantproductengine@lindenlab.com>2018-05-22 15:22:17 +0000
commit32b07b5a6fb96ef91262be5b06815ab2c695784c (patch)
tree278ccbc9ef2b6e081375762d7380007cb0ea35b4 /indra
parent9411bd1cef9c084f8e51751a60667cce58b77e36 (diff)
parentd35a8fcb3fca2b080a029bd261894c3ba0fdb6f5 (diff)
Merged in ruslantproductengine/viewer-neko-4cr-4 (pull request #607)
MAINT-8670 Crash in: LLFace::getGeometryVolume() Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com> Approved-by: Andrey Kleshchev <andreykproductengine@lindenlab.com> Approved-by: Simon Linden <simon@lindenlab.com>
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llface.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 50a4925c37..474645c084 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1217,6 +1217,12 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
{
LL_RECORD_BLOCK_TIME(FTM_FACE_GET_GEOM);
llassert(verify());
+
+ if (volume.getNumVolumeFaces() <= f) {
+ LL_WARNS() << "Attempt get volume face out of range! Total Faces: " << volume.getNumVolumeFaces() << " Attempt get access to: " << f << LL_ENDL;
+ return FALSE;
+ }
+
const LLVolumeFace &vf = volume.getVolumeFace(f);
S32 num_vertices = (S32)vf.mNumVertices;
S32 num_indices = (S32) vf.mNumIndices;