summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2012-09-24 09:27:15 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-09-24 10:24:43 +0200
commit736b9ee7bdd5f9fd0a65a7ab3d9ae3c283007f09 (patch)
tree9e32532db8f9699629259f8d8ab8152f58a87693
parentdon't add old cond formats if new ones are already loaded, fdo#54749 (diff)
downloadcore-736b9ee7bdd5f9fd0a65a7ab3d9ae3c283007f09.tar.gz
core-736b9ee7bdd5f9fd0a65a7ab3d9ae3c283007f09.zip
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 Signed-off-by: Michael Meeks <michael.meeks@suse.com> Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr> Signed-off-by: Andras Timar <atimar@suse.com>
-rw-r--r--package/source/zipapi/ZipFile.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index f154dfeda051..53ace460f8e5 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -699,9 +699,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 );
}