[libreoffice/f17] Resolves: rhbz#863052 fix ZipIOException on mismatched timestamps

Caolán McNamara caolanm at fedoraproject.org
Thu Oct 4 12:59:25 UTC 2012


commit 6c2859a1cb1b6a740ea20c12d2b2081d2b82d0de
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 4 13:40:18 2012 +0100

    Resolves: rhbz#863052 fix ZipIOException on mismatched timestamps

 ...do-54609-Do-not-consider-timestamp-differ.patch |   35 ++++++++++++++++++++
 libreoffice.spec                                   |    7 +++-
 2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/0001-fdo-49819-fdo-54609-Do-not-consider-timestamp-differ.patch b/0001-fdo-49819-fdo-54609-Do-not-consider-timestamp-differ.patch
new file mode 100644
index 0000000..c6828be
--- /dev/null
+++ b/0001-fdo-49819-fdo-54609-Do-not-consider-timestamp-differ.patch
@@ -0,0 +1,35 @@
+From afb9212cd39efcabd8a2f444d2f2979abb325a6a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba at bluewin.ch>
+Date: Mon, 24 Sep 2012 09:27:15 +0200
+Subject: [PATCH] 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 at suse.com>
+---
+ package/source/zipapi/ZipFile.cxx | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
+index f154dfe..53ace46 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 );
+     }
+-- 
+1.7.11.4
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 8666aee..2369a4d 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -35,7 +35,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        %{libo_version}.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 License:        (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic
 Group:          Applications/Productivity
 URL:            http://www.documentfoundation.org/develop
@@ -161,6 +161,7 @@ Patch43: 0001-rhbz-852128-sw-avoid-table-undo-crash.patch
 Patch44: 0002-rhbz-689053-fix-crash-following-delete-at-last-table.patch
 Patch45: 0003-rhbz-820283-fix-crashes-in-DOCX-table-import.patch
 Patch46: 0004-rhbz-827695-sw-prevent-crashes-after-incomplete-prin.patch
+Patch47: 0001-fdo-49819-fdo-54609-Do-not-consider-timestamp-differ.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1037,6 +1038,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch44 -p1 -b .rhbz-689053-fix-crash-following-delete-at-last-table.patch
 %patch45 -p1 -b .rhbz-820283-fix-crashes-in-DOCX-table-import.patch
 %patch46 -p1 -b .rhbz-827695-sw-prevent-crashes-after-incomplete-prin.patch
+%patch47 -p1 -b .fdo-49819-fdo-54609-Do-not-consider-timestamp-differ.patch
 
 # TODO: check this
 # these are horribly incomplete--empty translations and copied english
@@ -2323,6 +2325,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
+* Thu Oct 04 2012 David Tardon <dtardon at redhat.com> - 1:3.5.7.2-2
+- Resolves: rhbz#863052 fix ZipIOException on mismatched timestamps
+
 * Thu Oct 04 2012 David Tardon <dtardon at redhat.com> - 1:3.5.7.2-1
 - update to 3.5.7
 - Related: rhbz#826526 Inform user about unsupported PDF encryption formats


More information about the scm-commits mailing list