This is an automated email from the ASF dual-hosted git repository.
ardovm pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO41X by this push:
new 031efda571 Restore compatibility with provided files
031efda571 is described below
commit 031efda57150e37f12b4c9e35b08567f72bbb4e2
Author: Arrigo Marchiori <[email protected]>
AuthorDate: Wed Sep 16 22:16:36 2026 +0200
Restore compatibility with provided files
Certain documents are slightly invalid ZIP's: their entries have a data
descriptor, but their "flags" field say otherwise. Remain compatible
with our past bugs.
Thanks to Czesław Wolański for reporting, and Peter Kovacs for proposing
this fix!
(cherry picked from commit 57cd559d060c509755c8b0f6cac469b512911542)
---
main/package/source/zipapi/ZipFile.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main/package/source/zipapi/ZipFile.cxx
b/main/package/source/zipapi/ZipFile.cxx
index 7d96a4b612..8998715de8 100644
--- a/main/package/source/zipapi/ZipFile.cxx
+++ b/main/package/source/zipapi/ZipFile.cxx
@@ -998,7 +998,7 @@ sal_Int32 ZipFile::readCEN()
throw ZipException(OUString(
RTL_CONSTASCII_USTRINGPARAM ( "ZIP file contains a hole between local
descriptor and file data" ) ), uno::Reference < XInterface > () );
// File data
nPos += aIt->second.nCompressedSize;
- if ( aIt->second.nFlag & ( 1 << 3 ) ) {
+ if ( aIt->second.bHasDataDescriptor ) {
// Data descriptor...
nPos += 16; // ...with signature
nPos2 = nPos - 4; // ...without signature