6c2859a
From afb9212cd39efcabd8a2f444d2f2979abb325a6a Mon Sep 17 00:00:00 2001
6c2859a
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
6c2859a
Date: Mon, 24 Sep 2012 09:27:15 +0200
6c2859a
Subject: [PATCH] fdo#49819, fdo#54609: Do not consider timestamp differences
6c2859a
 as corruption
6c2859a
6c2859a
MSO 2010 can produce a files with different timestamps in the
6c2859a
central directory entry and local file header
6c2859a
6c2859a
Change-Id: Ic6fc0b2fad96eb30babdd7e6ef4a0175936da4c5
6c2859a
Signed-off-by: Michael Meeks <michael.meeks@suse.com>
6c2859a
---
6c2859a
 package/source/zipapi/ZipFile.cxx | 4 +++-
6c2859a
 1 file changed, 3 insertions(+), 1 deletion(-)
6c2859a
6c2859a
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
6c2859a
index f154dfe..53ace46 100644
6c2859a
--- a/package/source/zipapi/ZipFile.cxx
6c2859a
+++ b/package/source/zipapi/ZipFile.cxx
6c2859a
@@ -699,9 +699,11 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
6c2859a
         // Do *not* compare nMethod / nHow, older versions with
6c2859a
         // encrypted streams write mismatching DEFLATE/STORE pairs
6c2859a
         // there.
6c2859a
+        // Do *not* compare timestamps, since MSO 2010 can produce documents
6c2859a
+        // with timestamp difference in the central directory entry and local
6c2859a
+        // file header.
6c2859a
         bBroken = rEntry.nVersion != nVersion
6c2859a
                         || (rEntry.nFlag & ~6L) != (nFlag & ~6L)
6c2859a
-                        || rEntry.nTime != nTime
6c2859a
                         || rEntry.nPathLen != nPathLen
6c2859a
                         || !rEntry.sPath.equals( sLOCPath );
6c2859a
     }
6c2859a
-- 
6c2859a
1.7.11.4
6c2859a