summaryrefslogtreecommitdiffstats
path: root/emfio
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-31 14:12:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-01 09:28:54 +0200
commit4b1edb272c029cf72681730133e3c2272068bbad (patch)
tree5b1231c1793cc1634e82a97b68e6c46811525e00 /emfio
parentofz: MemorySanitizer: use-of-uninitialized-value (diff)
downloadcore-4b1edb272c029cf72681730133e3c2272068bbad.tar.gz
core-4b1edb272c029cf72681730133e3c2272068bbad.zip
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: Ia1e6d4c71d4bd228f2a9bb5fd2f5dbf54b94700d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121396 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/emfreader.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index a06e589f213b..2c353dc71694 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1401,8 +1401,13 @@ namespace emfio
{
sal_Int32 nStartX, nStartY, nEndX, nEndY;
mpInputStream->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadInt32( nStartX ).ReadInt32( nStartY ).ReadInt32( nEndX ).ReadInt32( nEndY );
- tools::Polygon aPoly( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), PolyStyle::Pie );
- DrawPolygon( aPoly, mbRecordPath );
+ if (!mpInputStream->good())
+ bStatus = false;
+ else
+ {
+ tools::Polygon aPoly( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), PolyStyle::Pie );
+ DrawPolygon( aPoly, mbRecordPath );
+ }
}
break;