summaryrefslogtreecommitdiffstats
path: root/package/source
diff options
context:
space:
mode:
Diffstat (limited to 'package/source')
-rw-r--r--package/source/zipapi/ZipFile.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index ef801f205813..16d5a0063302 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -686,9 +686,15 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
rEntry.sPath = sLOCPath;
}
- // check basic local file header / entry consistency
+ // check basic local file header / entry consistency, just
+ // plain ignore bits 1 & 2 of the flag field - they are either
+ // purely informative, or even fully undefined (depending on
+ // nMethod)
+ // Do *not* compare nMethod / nHow, older versions with
+ // encrypted streams write mismatching DEFLATE/STORE pairs
+ // there.
bBroken = rEntry.nVersion != nVersion
- || rEntry.nFlag != nFlag
+ || (rEntry.nFlag & ~6L) != (nFlag & ~6L)
|| rEntry.nTime != nTime
|| rEntry.nPathLen != nPathLen
|| !rEntry.sPath.equals( sLOCPath );