Kaydet (Commit) 5db7ac23 authored tarafından Fridrich Štrba's avatar Fridrich Štrba

fdo#49819, fdo#54609: Do not consider timestamp differences as corruption

MSO 2010 can produce a files with different timestamps in the
central directory entry and local file header

Change-Id: Ic6fc0b2fad96eb30babdd7e6ef4a0175936da4c5
üst c6107b7d
...@@ -693,9 +693,11 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry ) ...@@ -693,9 +693,11 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
// Do *not* compare nMethod / nHow, older versions with // Do *not* compare nMethod / nHow, older versions with
// encrypted streams write mismatching DEFLATE/STORE pairs // encrypted streams write mismatching DEFLATE/STORE pairs
// there. // there.
// Do *not* compare timestamps, since MSO 2010 can produce documents
// with timestamp difference in the central directory entry and local
// file header.
bBroken = rEntry.nVersion != nVersion bBroken = rEntry.nVersion != nVersion
|| (rEntry.nFlag & ~6L) != (nFlag & ~6L) || (rEntry.nFlag & ~6L) != (nFlag & ~6L)
|| rEntry.nTime != nTime
|| rEntry.nPathLen != nPathLen || rEntry.nPathLen != nPathLen
|| !rEntry.sPath.equals( sLOCPath ); || !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