diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-12-15 12:30:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-12-15 13:36:39 +0100 |
commit | 82b71e04a1594755d345d227181642c491518e18 (patch) | |
tree | 0704387e3ead24a6fffce7433dc862f6882b98a8 /package/source/zipapi/ZipFile.cxx | |
parent | 7f2f96330056e62fffc96690e077b89cd338dd10 (diff) |
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.
Diffstat (limited to 'package/source/zipapi/ZipFile.cxx')
-rw-r--r-- | package/source/zipapi/ZipFile.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 8317745b19bc..ef801f205813 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 >() ); |