зеркало из https://github.com/mozilla/pjs.git
Bug 243511 Fix crash when displaying bitmap with invalid number of colours r=biesi sr=tor
This commit is contained in:
Родитель
ad5691b9c8
Коммит
93189a5531
|
@ -258,7 +258,9 @@ NS_METHOD nsBMPDecoder::ProcessData(const char* aBuffer, PRUint32 aCount)
|
|||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
if (mBIH.bpp <= 8) {
|
||||
mNumColors = mBIH.colors ? mBIH.colors : 1 << mBIH.bpp;
|
||||
mNumColors = 1 << mBIH.bpp;
|
||||
if (mBIH.colors && mBIH.colors < mNumColors)
|
||||
mNumColors = mBIH.colors;
|
||||
|
||||
mColors = new colorTable[mNumColors];
|
||||
if (!mColors)
|
||||
|
|
Загрузка…
Ссылка в новой задаче