Kaydet (Commit) 3cbe0047 authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: ofz#318 limit bitmap max to SAL_MAX_INT32

Change-Id: Iae8a0782e5c306f619e0d94a60dfa0d7c00ec54e
üst 036c1f44
......@@ -121,9 +121,15 @@ BitmapBuffer* ImplCreateDIB(
pDIB->maPalette.SetEntryCount( nColors );
}
size_t size = pDIB->mnScanlineSize * pDIB->mnHeight;
if (size > SAL_MAX_INT32)
{
delete pDIB;
return nullptr;
}
try
{
size_t size = pDIB->mnScanlineSize * pDIB->mnHeight;
pDIB->mpBits = new sal_uInt8[size];
#ifdef __SANITIZE_ADDRESS__
if (!pDIB->mpBits)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment