From 1e8fd5491bde91fe6daca7d78f217a4d46084a5b Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Thu, 13 Aug 2026 07:13:36 +1000 Subject: [PATCH] [FIRE-35632] Fix LLViewerParcelMgr::writeHighlightSegments crashing from writing out of bounds Merged upstream in SLViewer PR#6126 --- indra/newview/llviewerparcelmgr.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index a3a34b828d..5cebe6ae4a 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -339,6 +339,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 );