[Libreoffice-commits] .: Branch 'libreoffice-3-4-5' - package/source

Petr Mladek pmladek at kemper.freedesktop.org
Fri Dec 23 02:06:26 PST 2011


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

New commits:
commit af45ce4dc9a4b7aea9214b5d74bf60809a4da78d
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Mon Dec 19 11:45:26 2011 +0100

    Revert "Fix n#653688"
    
    This reverts commit 4481a2fd1a40b27c1f8e784517b79fcc3c3ca196.
    
    Broke password-protected odf document reading.
    
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
    Signed-off-by: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index 03a0108..fb56c28 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -802,7 +802,7 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
 
         // the method can be reset for internal use so it is not checked
         bBroken = rEntry.nVersion != nVersion
-                        || rEntry.nMethod != nHow
+                        || rEntry.nFlag != nFlag
                         || rEntry.nTime != nTime
                         || rEntry.nPathLen != nPathLen
                         || !rEntry.sPath.equals( sLOCPath );
@@ -812,12 +812,6 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
         bBroken = sal_True;
     }
 
-    // ignore bits 1 & 2 for normal deflate algo - they're purely informative
-    if( nHow != 8 && nHow != 9 )
-        bBroken = bBroken || rEntry.nFlag != nFlag;
-    else if( (rEntry.nFlag & ~6L) != (nFlag & ~6L) )
-        bBroken = true;
-
     if ( bBroken && !bRecoveryMode )
         throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "The stream seems to be broken!" ) ),
                             Reference< XInterface >() );


More information about the Libreoffice-commits mailing list