[Libreoffice-commits] core.git: emfio/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Aug 29 10:58:26 UTC 2021
emfio/source/reader/emfreader.cxx | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
New commits:
commit 7362351b62b0f3c2967e11b96b9c55a94ee68925
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Aug 28 21:48:21 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Aug 29 12:57:53 2021 +0200
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I4a34981e6597743f9f3a9ad6ca063cb347a68d14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121212
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index c0aecda9f680..8fed29a17f50 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1383,12 +1383,17 @@ 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 );
- SAL_INFO( "emfio", "\t\t Bounds: " << nX32 << ":" << nY32 << ", " << nx32 << ":" << ny32 << ", Start: " << nStartX << ":" << nStartY << ", End: " << nEndX << ":" << nEndY );
- tools::Polygon aPoly( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), PolyStyle::Arc );
- if ( nRecType == EMR_CHORD )
- DrawPolygon( aPoly, mbRecordPath );
+ if (!mpInputStream->good())
+ bStatus = false;
else
- DrawPolyLine( aPoly, nRecType == EMR_ARCTO, mbRecordPath );
+ {
+ SAL_INFO( "emfio", "\t\t Bounds: " << nX32 << ":" << nY32 << ", " << nx32 << ":" << ny32 << ", Start: " << nStartX << ":" << nStartY << ", End: " << nEndX << ":" << nEndY );
+ tools::Polygon aPoly( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), PolyStyle::Arc );
+ if ( nRecType == EMR_CHORD )
+ DrawPolygon( aPoly, mbRecordPath );
+ else
+ DrawPolyLine( aPoly, nRecType == EMR_ARCTO, mbRecordPath );
+ }
}
break;
More information about the Libreoffice-commits
mailing list