summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
authorTJ <tj8@live.com.au>2026-08-13 23:55:24 +1000
committerGitHub <noreply@github.com>2026-08-13 16:55:24 +0300
commit705d53b3e9065c766b63037d2209b9664c3d4d24 (patch)
tree2ec40a2e6d6f01fed8734c805fa00574ce561814 /indra/newview/llviewerparcelmgr.cpp
parentb6648c2b4b69eceb5264b850d92702ae1c5e6911 (diff)
#6125 Fix LLViewerParcelMgr::writeHighlightSegments crashing from writing out of bounds
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rw-r--r--indra/newview/llviewerparcelmgr.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index b794047135..63eb08e4ae 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -309,6 +309,14 @@ void LLViewerParcelMgr::resetSegments(U8* segments)
void LLViewerParcelMgr::writeHighlightSegments(F32 west, F32 south, F32 east,
F32 north)
{
+ if (west < 0 || south < 0 || east < 0 || north < 0)
+ {
+ LL_WARNS() << "Invalid parcel edge coordinates provided to writeHighlightSegments- "
+ << "west: " << west << ", south: " << south << ", east: " << east << ", north: " << north
+ << LL_ENDL;
+ return;
+ }
+
S32 x, y;
S32 min_x = ll_round( west / PARCEL_GRID_STEP_METERS );
S32 max_x = ll_round( east / PARCEL_GRID_STEP_METERS );