Related: ofz#318 limit bitmap max to SAL_MAX_INT32
Change-Id: Iae8a0782e5c306f619e0d94a60dfa0d7c00ec54e
This commit is contained in:
@@ -121,9 +121,15 @@ BitmapBuffer* ImplCreateDIB(
|
|||||||
pDIB->maPalette.SetEntryCount( nColors );
|
pDIB->maPalette.SetEntryCount( nColors );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t size = pDIB->mnScanlineSize * pDIB->mnHeight;
|
||||||
|
if (size > SAL_MAX_INT32)
|
||||||
|
{
|
||||||
|
delete pDIB;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
size_t size = pDIB->mnScanlineSize * pDIB->mnHeight;
|
|
||||||
pDIB->mpBits = new sal_uInt8[size];
|
pDIB->mpBits = new sal_uInt8[size];
|
||||||
#ifdef __SANITIZE_ADDRESS__
|
#ifdef __SANITIZE_ADDRESS__
|
||||||
if (!pDIB->mpBits)
|
if (!pDIB->mpBits)
|
||||||
|
Reference in New Issue
Block a user