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

ofz#12666 fuzzing timeout

Change-Id: I7892bef62c93dd30d5a7d9605e0e6d62fdd35cb1
Reviewed-on: https://gerrit.libreoffice.org/67133
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 21299f54
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include "main.hxx" #include "main.hxx"
#include <sal/log.hxx>
#include <unotools/configmgr.hxx>
#include <vcl/BitmapTools.hxx> #include <vcl/BitmapTools.hxx>
#include <memory> #include <memory>
...@@ -308,6 +310,12 @@ bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor& rDesc ) ...@@ -308,6 +310,12 @@ bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor& rDesc )
void CGMBitmap::ImplInsert( CGMBitmapDescriptor const & rSource, CGMBitmapDescriptor& rDest ) void CGMBitmap::ImplInsert( CGMBitmapDescriptor const & rSource, CGMBitmapDescriptor& rDest )
{ {
if (utl::ConfigManager::IsFuzzing() && rDest.mxBitmap.GetSizePixel().Height() + rSource.mnY > SAL_MAX_UINT16)
{
SAL_WARN("filter.icgm", "bitmap would expand too much");
rDest.mbStatus = false;
return;
}
rDest.mxBitmap.Expand( 0, rSource.mnY ); rDest.mxBitmap.Expand( 0, rSource.mnY );
rDest.mxBitmap.CopyPixel( tools::Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ), rDest.mxBitmap.CopyPixel( tools::Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ),
tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), &rSource.mxBitmap ); tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), &rSource.mxBitmap );
......
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