summaryrefslogtreecommitdiff
path: root/vcl/headless/svpbmp.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-06 20:54:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-06 20:54:19 +0000
commita6b6980afa443b3d317de5f24d993f939073d73a (patch)
treea8f4b0b256e0d3a38db9daf2dcddc95169e08741 /vcl/headless/svpbmp.cxx
parentb9648deb1d99cde1c085767433242d6e1b834e2d (diff)
oss-fuzz: make max sane bitmap allocation smaller
Change-Id: I0b924f615ed4652ce605c12d2d2e9ca2ad2befbf
Diffstat (limited to 'vcl/headless/svpbmp.cxx')
-rw-r--r--vcl/headless/svpbmp.cxx4
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;