Skip to content

Commit fa963b6

Browse files
committed
#3438 Crash when ParcelProperties' Bitmap is of wrong size
1 parent 2ee845c commit fa963b6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

indra/newview/llviewerparcelmgr.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,6 +1824,16 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
18241824
S32 bitmap_size = parcel_mgr.mParcelsPerEdge
18251825
* parcel_mgr.mParcelsPerEdge
18261826
/ 8;
1827+
S32 size = msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_Bitmap);
1828+
if (size != bitmap_size)
1829+
{
1830+
// Might be better to ignore bitmap and drop highlights
1831+
LL_WARNS("ParcelMgr") << "Parcel Bitmap size expected: " << bitmap_size
1832+
<< " actual " << size
1833+
<< ". Bitmap might be corrupted!" << LL_ENDL;
1834+
bitmap_size = size;
1835+
}
1836+
18271837
U8* bitmap = new U8[ bitmap_size ];
18281838
msg->getBinaryDataFast(_PREHASH_ParcelData, _PREHASH_Bitmap, bitmap, bitmap_size);
18291839

0 commit comments

Comments
 (0)