[Libreoffice-commits] core.git: emfio/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 31 09:15:09 UTC 2018
emfio/source/reader/emfreader.cxx | 4 ++--
emfio/source/reader/mtftools.cxx | 10 +++++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
New commits:
commit ede60a762baad7f8b789c156407f65ef9093e08e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 31 09:14:15 2018 +0000
tweak clippath fuzzing path
Change-Id: Iebcf12eec5cf5282e798ff5d4fe6649e3a8eea3f
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index d1873c74f4fa..fdb8dbf43cbb 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1210,7 +1210,7 @@ namespace emfio
case EMR_SELECTCLIPPATH :
{
- sal_Int32 nClippingMode;
+ sal_Int32 nClippingMode(0);
mpInputStream->ReadInt32(nClippingMode);
SetClipPath(GetPathObj(), nClippingMode, true);
}
@@ -1218,7 +1218,7 @@ namespace emfio
case EMR_EXTSELECTCLIPRGN :
{
- sal_Int32 nClippingMode, cbRgnData;
+ sal_Int32 nClippingMode(0), cbRgnData(0);
mpInputStream->ReadInt32(cbRgnData);
mpInputStream->ReadInt32(nClippingMode);
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 1b880b01cc2e..79f7efc90abd 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -788,6 +788,8 @@ namespace emfio
void MtfTools::IntersectClipRect( const tools::Rectangle& rRect )
{
+ if (utl::ConfigManager::IsFuzzing())
+ return;
mbClipNeedsUpdate=true;
if ((rRect.Left()-rRect.Right()==0) && (rRect.Top()-rRect.Bottom()==0))
{
@@ -798,18 +800,24 @@ namespace emfio
void MtfTools::ExcludeClipRect( const tools::Rectangle& rRect )
{
+ if (utl::ConfigManager::IsFuzzing())
+ return;
mbClipNeedsUpdate=true;
maClipPath.excludeClipRect( ImplMap( rRect ) );
}
void MtfTools::MoveClipRegion( const Size& rSize )
{
+ if (utl::ConfigManager::IsFuzzing())
+ return;
mbClipNeedsUpdate=true;
maClipPath.moveClipRegion( ImplMap( rSize ) );
}
void MtfTools::SetClipPath( const tools::PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode, bool bIsMapped )
{
+ if (utl::ConfigManager::IsFuzzing())
+ return;
mbClipNeedsUpdate = true;
tools::PolyPolygon aPolyPolygon(rPolyPolygon);
@@ -924,7 +932,7 @@ namespace emfio
void MtfTools::UpdateClipRegion()
{
- if (mbClipNeedsUpdate && !utl::ConfigManager::IsFuzzing())
+ if (mbClipNeedsUpdate)
{
mbClipNeedsUpdate = false;
mbComplexClip = false;
More information about the Libreoffice-commits
mailing list