summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-04 16:59:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-05 15:17:26 +0200
commit86875a2e910bcc1a9d2c47c34ea5f71501776193 (patch)
tree63f00e470807313384714630ede63649757f1da7 /filter
parentdd2b43c8a3c7cc5b7f057f26c0f43978b9e31f68 (diff)
ofz#17448 avoid OOM
Change-Id: Ie709eb0ce7c3987081b4b01fd96e7f99e7a48c27 Reviewed-on: https://gerrit.libreoffice.org/80240 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 74895eb4251f..c57ad6b97924 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -19,6 +19,7 @@
#include <string.h>
+#include <unotools/configmgr.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/metaact.hxx>
#include <vcl/virdev.hxx>
@@ -300,6 +301,8 @@ void DXF2GDIMetaFile::DrawCircleEntity(const DXFCircleEntity & rE, const DXFTran
void DXF2GDIMetaFile::DrawLine(const Point& rA, const Point& rB)
{
+ if (utl::ConfigManager::IsFuzzing())
+ return;
GDIMetaFile* pMetaFile = pVirDev->GetConnectMetaFile();
assert(pMetaFile);
//use AddAction instead of OutputDevice::DrawLine so that we can explicitly share
@@ -811,7 +814,8 @@ bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
}
pVirDev->EnableOutput(false);
- rMTF.Record(pVirDev);
+ if (!utl::ConfigManager::IsFuzzing()) // for fuzzing don't bother recording the drawing
+ rMTF.Record(pVirDev);
aActLineColor = pVirDev->GetLineColor();
aActFillColor = pVirDev->GetFillColor();