diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-08-04 22:14:08 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-08-04 22:14:08 +0300 |
commit | 09400b74ad79c468ca207005a6ca6621fa845f5d (patch) | |
tree | 27e7f4a7dcf4ba8b8d50ef622009a704c12b32cb /indra/llmath/llvolume.cpp | |
parent | 51efcfea259ef425c42895e0b6b5d77c2371fdf3 (diff) |
SL-17902 Crash at LLAlignedArray, out of bounds
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r-- | indra/llmath/llvolume.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index c27b144f19..93f1d508f3 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6674,13 +6674,19 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) else { // Get s value for tex-coord. - if (!flat) + S32 index = mBeginS + s; + if (index >= profile.size()) + { + // edge? + ss = flat ? 1.f - begin_stex : 1.f; + } + else if (!flat) { - ss = profile[mBeginS + s][2]; + ss = profile[index][2]; } else { - ss = profile[mBeginS + s][2] - begin_stex; + ss = profile[index][2] - begin_stex; } } |