#3438 Crash when ParcelProperties' Bitmap is of wrong size

meow-7.2.2
Andrey Kleshchev 2025-01-20 21:42:33 +02:00 committed by Andrey Kleshchev
parent 2ee845c028
commit fa963b6b15
1 changed files with 10 additions and 0 deletions

View File

@ -1824,6 +1824,16 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
S32 bitmap_size = parcel_mgr.mParcelsPerEdge
* parcel_mgr.mParcelsPerEdge
/ 8;
S32 size = msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_Bitmap);
if (size != bitmap_size)
{
// Might be better to ignore bitmap and drop highlights
LL_WARNS("ParcelMgr") << "Parcel Bitmap size expected: " << bitmap_size
<< " actual " << size
<< ". Bitmap might be corrupted!" << LL_ENDL;
bitmap_size = size;
}
U8* bitmap = new U8[ bitmap_size ];
msg->getBinaryDataFast(_PREHASH_ParcelData, _PREHASH_Bitmap, bitmap, bitmap_size);