emfio/source/reader/emfreader.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit 4b1edb272c029cf72681730133e3c2272068bbad Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Aug 31 14:12:27 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Sep 1 09:28:54 2021 +0200 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 <caol...@redhat.com> 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;