mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 284037 OOM crash [@ nsCairoBlender::GetAlphas]
patch by b.jacques@planet.nl r=roc sr=roc a=asa
This commit is contained in:
parent
9a61950459
commit
fdaaf22a10
@ -113,6 +113,8 @@ nsCairoBlender::GetAlphas(const nsRect& aRect, nsIDrawingSurface* aBlack,
|
||||
nsIDrawingSurface* aWhite, PRUint8** aAlphas)
|
||||
{
|
||||
*aAlphas = (PRUint8*) nsMemory::Alloc(aRect.width * aRect.height);
|
||||
NS_ENSURE_TRUE(*aAlphas, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
memset(*aAlphas, 0, aRect.width * aRect.height);
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user