diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-06 20:54:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-06 20:54:19 +0000 |
commit | a6b6980afa443b3d317de5f24d993f939073d73a (patch) | |
tree | a8f4b0b256e0d3a38db9daf2dcddc95169e08741 /vcl/headless/svpbmp.cxx | |
parent | b9648deb1d99cde1c085767433242d6e1b834e2d (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.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; |