[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - emfio/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 30 12:11:48 UTC 2021
emfio/source/reader/emfreader.cxx | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
New commits:
commit e40da04c6fa28a23aa838b05c976527c5dd3b57e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Aug 28 21:48:21 2021 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Aug 30 14:11:13 2021 +0200
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I4a34981e6597743f9f3a9ad6ca063cb347a68d14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121213
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
Tested-by: Jenkins
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 144cab9f0021..772f9c695fa3 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1359,12 +1359,17 @@ namespace emfio
{
sal_uInt32 nStartX, nStartY, nEndX, nEndY;
mpInputStream->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nStartX ).ReadUInt32( nStartY ).ReadUInt32( nEndX ).ReadUInt32( nEndY );
- tools::Polygon aPoly( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), PolyStyle::Arc );
- aPoly.Optimize( PolyOptimizeFlags::EDGES );
- if ( nRecType == EMR_CHORD )
- DrawPolygon( aPoly, mbRecordPath );
+ if (!mpInputStream->good())
+ bStatus = false;
else
- DrawPolyLine( aPoly, nRecType == EMR_ARCTO, mbRecordPath );
+ {
+ tools::Polygon aPoly( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), PolyStyle::Arc );
+ aPoly.Optimize( PolyOptimizeFlags::EDGES );
+ if ( nRecType == EMR_CHORD )
+ DrawPolygon( aPoly, mbRecordPath );
+ else
+ DrawPolyLine( aPoly, nRecType == EMR_ARCTO, mbRecordPath );
+ }
}
break;
More information about the Libreoffice-commits
mailing list