package/source/zipapi/ZipFile.cxx | 1 + 1 file changed, 1 insertion(+)
New commits: commit 9db61a9f737bf0c152cdd36c0249562a4d5b8fce Author: Caolán McNamara <[email protected]> AuthorDate: Sun Mar 1 13:04:15 2026 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Mar 6 15:03:56 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/+/200709 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 5e903627d763..62c1efb7a7a3 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -1294,6 +1294,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);
