Bug 1432679. Do multiplication in nsGIFDecoder2::FinishImageDescriptor as int64_t to avoid overflow. r=aosmond

pixels_remaining is already an int64_t.
This commit is contained in:
Timothy Nikkel 2018-02-07 17:00:06 -06:00
parent 3de4dd3353
commit 56490d71bb

View File

@ -880,7 +880,8 @@ nsGIFDecoder2::FinishImageDescriptor(const char* aData)
}
// Clear state from last image.
mGIFStruct.pixels_remaining = frameRect.Width() * frameRect.Height();
mGIFStruct.pixels_remaining =
int64_t(frameRect.Width()) * int64_t(frameRect.Height());
if (haveLocalColorTable) {
// We have a local color table, so prepare to read it into the palette of