This is an automated email from the ASF dual-hosted git repository.
ardovm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 57cd559d06 Restore compatibility with provided files
57cd559d06 is described below
commit 57cd559d060c509755c8b0f6cac469b512911542
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!
---
main/package/source/package/zipapi/ZipFile.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main/package/source/package/zipapi/ZipFile.cxx
b/main/package/source/package/zipapi/ZipFile.cxx
index 921d144bc3..7fd234bffc 100644
--- a/main/package/source/package/zipapi/ZipFile.cxx
+++ b/main/package/source/package/zipapi/ZipFile.cxx
@@ -982,7 +982,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