Bug 284036 OOM crash [@ nsCairoImage::Init]

patch by b.jacques@planet.nl r=roc sr=roc a=asa
This commit is contained in:
timeless%mozdev.org 2005-07-07 15:41:40 +00:00
Родитель fdaaf22a10
Коммит 12504d3aa5
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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);