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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Mar 21 19:49:39 UTC 2021


 sdext/source/pdfimport/pdfparse/pdfentries.cxx   |    1 +
 sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx |    1 +
 2 files changed, 2 insertions(+)

New commits:
commit 23316f2ef210960f22cba225be3d74e29b3182f4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Mar 21 15:07:22 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Mar 21 20:48:56 2021 +0100

    cid#1474243 Uninitialized scalar variable
    
    and
    
    cid#1473901 Uninitialized scalar variable
    
    Change-Id: I6a1d0784865c1a77eacbe25497b97ea63cf3705c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112849
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 0789268372e4..1e4c861df8dc 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -727,6 +727,7 @@ static void unzipToBuffer( char* pBegin, unsigned int nLen,
     z_stream aZStr;
     aZStr.next_in       = reinterpret_cast<Bytef *>(pBegin);
     aZStr.avail_in      = nLen;
+    aZStr.total_out = aZStr.total_in = 0;
     aZStr.zalloc        = nullptr;
     aZStr.zfree         = nullptr;
     aZStr.opaque        = nullptr;
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
index 39a1df6f4a76..a6390f0157e9 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
@@ -82,6 +82,7 @@ sal_uInt32 PngHelper::deflateBuffer( const Output_t* i_pBuf, size_t i_nLen, Outp
     aStream.zalloc  = Z_NULL;
     aStream.zfree   = Z_NULL;
     aStream.opaque  = Z_NULL;
+    aStream.total_out = aStream.total_in = 0;
     if (Z_OK != deflateInit(&aStream, Z_BEST_COMPRESSION))
         return 0;
     aStream.avail_in = uInt(i_nLen);


More information about the Libreoffice-commits mailing list