diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-09-24 09:27:15 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2012-09-24 09:27:15 +0200 |
commit | 5db7ac239278634c39cbb15f0173db0524b5dcd6 (patch) | |
tree | 30a7bd4672ca1d3c3194622beee46b833be22bd2 /package | |
parent | c6107b7d4901cfc120956ed9033279ec41f627b0 (diff) |
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
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zipapi/ZipFile.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index b655d3739cde..83984d68a170 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -693,9 +693,11 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry ) // Do *not* compare nMethod / nHow, older versions with // encrypted streams write mismatching DEFLATE/STORE pairs // 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 || (rEntry.nFlag & ~6L) != (nFlag & ~6L) - || rEntry.nTime != nTime || rEntry.nPathLen != nPathLen || !rEntry.sPath.equals( sLOCPath ); } |