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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 3 08:02:37 UTC 2021


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

New commits:
commit ce20a690c8e72b0d15ca5cfdc2241a7076dd8124
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Sep 2 16:48:25 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 3 10:02:01 2021 +0200

    ofz: MemorySanitizer: use-of-uninitialized-value
    
    Change-Id: I7cd46af148471de516860046c04f71b6ae5fea89
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121522
    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 15ea08f8d51c..45e50a90d7d4 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -470,28 +470,28 @@ namespace emfio
         }
 
         // Read the first EmrFormat.
-        sal_uInt32 nSignature;
+        sal_uInt32 nSignature(0);
         mpInputStream->ReadUInt32(nSignature);
         if (nSignature != PDF_SIGNATURE)
         {
             return;
         }
 
-        sal_uInt32 nVersion;
+        sal_uInt32 nVersion(0);
         mpInputStream->ReadUInt32(nVersion);
         if (nVersion != 1)
         {
             return;
         }
 
-        sal_uInt32 nSizeData;
+        sal_uInt32 nSizeData(0);
         mpInputStream->ReadUInt32(nSizeData);
         if (!nSizeData || nSizeData > mpInputStream->remainingSize())
         {
             return;
         }
 
-        sal_uInt32 nOffData;
+        sal_uInt32 nOffData(0);
         mpInputStream->ReadUInt32(nOffData);
         if (!nOffData)
         {


More information about the Libreoffice-commits mailing list