diff options
-rw-r--r-- | vcl/headless/svpbmp.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx index d11f3b92adbc..ee5a98359591 100644 --- a/vcl/headless/svpbmp.cxx +++ b/vcl/headless/svpbmp.cxx @@ -122,7 +122,7 @@ BitmapBuffer* ImplCreateDIB( } const size_t size = pDIB->mnScanlineSize * pDIB->mnHeight; - if (size > SAL_MAX_INT32) + if (size > SAL_MAX_INT32/2) { delete pDIB; return nullptr; @@ -178,7 +178,7 @@ bool SvpSalBitmap::Create(const SalBitmap& rBmp) mpDIB = new BitmapBuffer( *rSalBmp.mpDIB ); const size_t size = mpDIB->mnScanlineSize * mpDIB->mnHeight; - if (size > SAL_MAX_INT32) + if (size > SAL_MAX_INT32/2) { delete mpDIB; mpDIB = nullptr; |