package/source/zipapi/ZipFile.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 3893423f1c778c9d8f2cc18d629d186d78545434
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun Mar 1 13:04:15 2026 +0000
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Fri Mar 6 14:40:20 2026 +0100

    ofz#488752793 Integer-overflow
    
    possibly since:
    
    commit d7ad4553f4ec2a6117f5e6455d6325454c34464e
    Date:   Fri Jul 19 20:43:05 2024 +0200
    
        package: ZipFile: check Zip64 end of central directory for consistency
    
    Change-Id: I4bcaaf10be63aa5068b6c801ff1b8a2455dfc63c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200710
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/package/source/zipapi/ZipFile.cxx 
b/package/source/zipapi/ZipFile.cxx
index 934930e943a1..1d71ab220bdd 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -1296,6 +1296,7 @@ std::tuple<sal_Int64, sal_Int64, sal_Int64> 
ZipFile::findCentralDirectory()
                 if (o3tl::checked_add<sal_Int64>(nEnd64DirOffset, 
nEnd64DirSize, end)
                     || nLoc64End64Offset < end
                     || nEnd64DirOffset < 0
+                    || nEnd64DirSize < 0
                     || nLoc64End64Offset - nEnd64DirSize != nEnd64DirOffset)
                 {
                     throw ZipException(u"Invalid Zip64 end (bad central 
directory size)"_ustr);

Reply via email to