This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO50X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit e9166edf3eb388f1e8e1497075bf3a12566edb84
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/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

Reply via email to