[Libreoffice-commits] core.git: emfio/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 7 09:50:21 UTC 2021


 emfio/source/reader/emfreader.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5d47a0e6c0fe4c2aca0c6a6cc6a542bada977f12
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Sep 7 08:47:52 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Sep 7 11:49:48 2021 +0200

    ofz: MemorySanitizer: use-of-uninitialized-value
    
    Change-Id: I4c88389de1a7f6cf4ceac278b264a0ec71fba86d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121747
    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 f72db2353829..45ea81024519 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1015,7 +1015,7 @@ namespace emfio
 
                     case EMR_SETMAPMODE :
                     {
-                        sal_uInt32 nMapMode;
+                        sal_uInt32 nMapMode(0);
                         mpInputStream->ReadUInt32( nMapMode );
                         SAL_INFO("emfio", "\t\tMapMode: 0x" << std::hex << nMapMode << std::dec);
                         SetMapMode( nMapMode );
@@ -1101,7 +1101,7 @@ namespace emfio
 
                     case EMR_RESTOREDC :
                     {
-                        sal_Int32 nSavedDC;
+                        sal_Int32 nSavedDC(0);
                         mpInputStream->ReadInt32( nSavedDC );
                         SAL_INFO( "emfio", "\t\t SavedDC Index: " << nSavedDC );
                         if ( nSavedDC < 0 )


More information about the Libreoffice-commits mailing list