summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-25 16:25:00 +0200
committerDavid Tardon <dtardon@redhat.com>2013-07-25 14:39:09 +0000
commit79d2084fd8f60f4bc4076e51c31bf136ce2818ba (patch)
treedb92eb9ab16b713789ee7089a16cdab486876118
parent32afec7662fed6eea0714a8bf23e9f040672cb5a (diff)
Use the WPX_SEEK_SET inconditionally
Change-Id: I8d202d843b8ecf5a32131058ae1a5cd465e6069c (cherry picked from commit e4906561219fe88345ace8aa4d6f48cbb01262d8) Reviewed-on: https://gerrit.libreoffice.org/5104 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--libcdr/UnpackedTarball_libcdr.mk4
-rw-r--r--libcdr/libcdr-wpx_seek_end.patch.114
-rw-r--r--libvisio/UnpackedTarball_libvisio.mk1
-rw-r--r--libvisio/libvisio-wpx_seek_end.patch.114
4 files changed, 33 insertions, 0 deletions
diff --git a/libcdr/UnpackedTarball_libcdr.mk b/libcdr/UnpackedTarball_libcdr.mk
index a91bc8e907ca..d25d241b22e6 100644
--- a/libcdr/UnpackedTarball_libcdr.mk
+++ b/libcdr/UnpackedTarball_libcdr.mk
@@ -11,4 +11,8 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libcdr))
$(eval $(call gb_UnpackedTarball_set_tarball,libcdr,$(CDR_TARBALL)))
+$(eval $(call gb_UnpackedTarball_add_patches,libcdr,\
+ libcdr/libcdr-wpx_seek_end.patch.1 \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/libcdr/libcdr-wpx_seek_end.patch.1 b/libcdr/libcdr-wpx_seek_end.patch.1
new file mode 100644
index 000000000000..67b8587996f8
--- /dev/null
+++ b/libcdr/libcdr-wpx_seek_end.patch.1
@@ -0,0 +1,14 @@
+--- a/src/lib/CDRZipStream.cpp
++++ b/src/lib/CDRZipStream.cpp
+@@ -160,11 +160,7 @@ WPXInputStream *libcdr::CDRZipStream::getDocumentOLEStream(const char *name)
+
+ bool libcdr::CDRZipStreamImpl::findCentralDirectoryEnd()
+ {
+-#if defined(LIBWPD_STREAM_VERSION_MAJOR) && defined(LIBWPD_STREAM_VERSION_MINOR) && defined(LIBWPD_STREAM_VERSION_REVISION) \
+- && (LIBWPD_STREAM_VERSION_MAJOR > 0 || (LIBWPD_STREAM_VERSION_MAJOR == 0 && (LIBWPD_STREAM_VERSION_MINOR > 9 \
+- || (LIBWPD_STREAM_VERSION_MINOR == 9 && LIBWPD_STREAM_VERSION_REVISION >= 5))))
+ if (m_cdir_offset || m_input->seek(-1024, WPX_SEEK_END))
+-#endif
+ m_input->seek(m_cdir_offset, WPX_SEEK_SET);
+ try
+ {
diff --git a/libvisio/UnpackedTarball_libvisio.mk b/libvisio/UnpackedTarball_libvisio.mk
index 8b41f4a74ef4..64f2b754952c 100644
--- a/libvisio/UnpackedTarball_libvisio.mk
+++ b/libvisio/UnpackedTarball_libvisio.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libvisio,$(VISIO_TARBALL)))
$(eval $(call gb_UnpackedTarball_add_patches,libvisio,\
libvisio/libvisio-0.0.30-msvc.patch.1 \
+ libvisio/libvisio-wpx_seek_end.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/libvisio/libvisio-wpx_seek_end.patch.1 b/libvisio/libvisio-wpx_seek_end.patch.1
new file mode 100644
index 000000000000..55bbf5719259
--- /dev/null
+++ b/libvisio/libvisio-wpx_seek_end.patch.1
@@ -0,0 +1,14 @@
+--- a/src/lib/VSDZipStream.cpp
++++ b/src/lib/VSDZipStream.cpp
+@@ -161,11 +161,7 @@ WPXInputStream *libvisio::VSDZipStream::getDocumentOLEStream(const char *name)
+
+ bool libvisio::VSDZipStreamImpl::findCentralDirectoryEnd()
+ {
+-#if defined(LIBWPD_STREAM_VERSION_MAJOR) && defined(LIBWPD_STREAM_VERSION_MINOR) && defined(LIBWPD_STREAM_VERSION_REVISION) \
+- && (LIBWPD_STREAM_VERSION_MAJOR > 0 || (LIBWPD_STREAM_VERSION_MAJOR == 0 && (LIBWPD_STREAM_VERSION_MINOR > 9 \
+- || (LIBWPD_STREAM_VERSION_MINOR == 9 && LIBWPD_STREAM_VERSION_REVISION >= 5))))
+ if (m_cdir_offset || m_input->seek(-1024, WPX_SEEK_END))
+-#endif
+ m_input->seek(m_cdir_offset, WPX_SEEK_SET);
+ try
+ {