[Libreoffice-commits] .: package/source
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Thu Dec 15 04:37:54 PST 2011
package/source/zipapi/ZipFile.cxx | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
New commits:
commit 82b71e04a1594755d345d227181642c491518e18
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Dec 15 12:30:13 2011 +0100
Revert "Fix n#653688"
This reverts commit 309f56174aca6adca879f70958892492361dac6e. It
caused password-protected documents to no longer work and made
sc_subsequent_filters_test's testPassword fail.
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index 8317745..ef801f2 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -688,7 +688,7 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
// check basic local file header / entry consistency
bBroken = rEntry.nVersion != nVersion
- || rEntry.nMethod != nHow
+ || rEntry.nFlag != nFlag
|| rEntry.nTime != nTime
|| rEntry.nPathLen != nPathLen
|| !rEntry.sPath.equals( sLOCPath );
@@ -698,12 +698,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!" ) ),
uno::Reference< XInterface >() );
More information about the Libreoffice-commits
mailing list