icecat: add release icecat-140.10.1-1gnu1 for ecne
This commit is contained in:
parent
a5f93cb214
commit
ff85d7c623
1256 changed files with 63469 additions and 24141 deletions
|
|
@ -238,7 +238,8 @@ nsBMPDecoder::nsBMPDecoder(RasterImage* aImage, uint32_t aDataOffset)
|
|||
nsBMPDecoder::~nsBMPDecoder() {}
|
||||
|
||||
// Obtains the size of the compressed image resource.
|
||||
int32_t nsBMPDecoder::GetCompressedImageSize() const {
|
||||
uint32_t nsBMPDecoder::GetCompressedImageSize() const {
|
||||
// Keep this in sync with the overflow check in ReadInfoHeaderRest.
|
||||
// In the RGB case mImageSize might not be set, so compute it manually.
|
||||
MOZ_ASSERT(mPixelRowSize != 0);
|
||||
return mH.mCompression == Compression::RGB ? mPixelRowSize * AbsoluteHeight()
|
||||
|
|
@ -637,6 +638,16 @@ LexerTransition<nsBMPDecoder::State> nsBMPDecoder::ReadInfoHeaderRest(
|
|||
mPixelRowSize += 4 - surplus;
|
||||
}
|
||||
|
||||
if (mIsWithinICO && mH.mCompression == Compression::RGB) {
|
||||
// The ICO decoders calls GetCompressedImageSize so we need to make sure the
|
||||
// computation it does cannot overflow. Keep this in sync with that
|
||||
// function.
|
||||
auto product = CheckedInt<uint32_t>(mPixelRowSize) * AbsoluteHeight();
|
||||
if (!product.isValid()) {
|
||||
return Transition::TerminateFailure();
|
||||
}
|
||||
}
|
||||
|
||||
size_t bitFieldsLengthStillToRead = 0;
|
||||
if (mH.mCompression == Compression::BITFIELDS) {
|
||||
// Need to read bitfields.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue