зеркало из https://github.com/mozilla/gecko-dev.git
Bug 284036 OOM crash [@ nsCairoImage::Init]
patch by b.jacques@planet.nl r=roc sr=roc a=asa
This commit is contained in:
Родитель
fdaaf22a10
Коммит
12504d3aa5
|
@ -134,6 +134,7 @@ nsCairoImage::Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth, nsMaskRequir
|
|||
|
||||
PRInt32 size = aWidth*aHeight*4;
|
||||
mImageSurfaceBuf = (PRUint32*)nsMemory::Alloc(size);
|
||||
NS_ENSURE_TRUE(mImageSurfaceBuf, NS_ERROR_OUT_OF_MEMORY);
|
||||
// Fill it in. Setting alpha to FF is important for images with no
|
||||
// alpha of their own
|
||||
memset(mImageSurfaceBuf, 0xFF, size);
|
||||
|
|
Загрузка…
Ссылка в новой задаче