mirror of
https://github.com/FirestormViewer/phoenix-firestorm.git
synced 2026-08-14 00:48:30 +00:00
[FIRE-35632] Fix LLViewerParcelMgr::writeHighlightSegments crashing from writing out of bounds
Merged upstream in SLViewer PR#6126
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user