package/source/zipapi/Inflater.cxx |    3 ++-
 package/source/zipapi/ZipFile.cxx  |    3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6e5ff9c5966b70becb4121c600859a580af1b7dc
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Aug 28 08:54:01 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Aug 28 12:16:46 2024 +0200

    cid#1618664 Self assignment
    
    used to be:
        Sequence<sal_Int8> aFileName;
        aGrabber.readBytes(aFileName, aEntry.nPathLen);
        aEntry.nPathLen = aFileName.getLength();
    so aEntry.nPathLen ended up as the the count of read bytes actually
    read when aEntry.nPathLen was requested
    
    Change-Id: I50b2c4c7be086e4b846998ee52fbabed6159279d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172508
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/package/source/zipapi/ZipFile.cxx 
b/package/source/zipapi/ZipFile.cxx
index 7914c772dbb7..5d223c57fad0 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -1625,10 +1625,9 @@ void ZipFile::HandlePK34(std::span<const sal_Int8> data, 
sal_Int64 dataOffset, s
     {
         std::vector<sal_Int8> aFileName(aEntry.nPathLen);
         aGrabber.seek(dataOffset + 30);
-        aGrabber.readBytes(aFileName.data(), aEntry.nPathLen);
+        aEntry.nPathLen = aGrabber.readBytes(aFileName.data(), 
aEntry.nPathLen);
         aEntry.sPath = OUString(reinterpret_cast<const 
char*>(aFileName.data()),
                                 aEntry.nPathLen, RTL_TEXTENCODING_UTF8);
-        aEntry.nPathLen = aEntry.nPathLen;
     }
     aEntry.sPath = aEntry.sPath.replace('\', '/');
 
commit 9520ff2c4d08123490496a914f2d4c1a2039d258
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Aug 28 08:39:52 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Aug 28 12:16:38 2024 +0200

    cid#1618667 Uninitialized pointer field
    
    Change-Id: Iaf23214c6931d068b37dbb04cfc73ae7f9a3d7ad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172506
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/package/source/zipapi/Inflater.cxx 
b/package/source/zipapi/Inflater.cxx
index 7867259aa764..acabee88fb45 100644
--- a/package/source/zipapi/Inflater.cxx
+++ b/package/source/zipapi/Inflater.cxx
@@ -139,7 +139,8 @@ InflaterBytes::InflaterBytes(bool bNoWrap)
   bNeedDict(false),
   nOffset(0),
   nLength(0),
-  nLastInflateError(0)
+  nLastInflateError(0),
+  sInBuffer(nullptr)
 {
     pStream.reset(new z_stream);
     /* memset to 0 to set zalloc/opaque etc */

Reply via email to