[Libreoffice-commits] core.git: vcl/headless
Caolán McNamara
caolanm at redhat.com
Fri Jan 6 20:55:41 UTC 2017
vcl/headless/svpbmp.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit a6b6980afa443b3d317de5f24d993f939073d73a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 6 20:54:19 2017 +0000
oss-fuzz: make max sane bitmap allocation smaller
Change-Id: I0b924f615ed4652ce605c12d2d2e9ca2ad2befbf
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index d11f3b9..ee5a983 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;
More information about the Libreoffice-commits
mailing list