Kaydet (Commit) d0ac36dd authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Better fix for over-zealous Zip package consistency.

Turns out our encrypted zip package code writes out mismatching
compression methods in central directory and local file headers -
so not only be lenient towards the apple bug (n#653688), but also
ours (i.e. keep not comparing nMethod with nHow).
üst f9128f98
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment