[Libreoffice-commits] core.git: external/liborcus
Caolán McNamara
caolanm at redhat.com
Sun Oct 11 13:23:16 PDT 2015
external/liborcus/UnpackedTarball_liborcus.mk | 1 +
external/liborcus/fix-crash-ooo55043-1.patch.0 | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
New commits:
commit 50529b713221548d9aa7447d125b734b8de44fa0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 11 21:20:37 2015 +0100
fix crash on examining ooo55043-1.odt etc
Change-Id: I3b57f50b09d491bd1b021eb95587becbd3f169a2
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
index e242cfc..f278049 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1))
$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \
external/liborcus/rpath.patch.0 \
+ external/liborcus/fix-crash-ooo55043-1.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/liborcus/fix-crash-ooo55043-1.patch.0 b/external/liborcus/fix-crash-ooo55043-1.patch.0
new file mode 100644
index 0000000..58a97c0
--- /dev/null
+++ b/external/liborcus/fix-crash-ooo55043-1.patch.0
@@ -0,0 +1,17 @@
+--- src/parser/zip_archive_stream.cpp
++++ src/parser/zip_archive_stream.cpp
+@@ -91,8 +91,13 @@
+
+ void zip_archive_stream_blob::read(unsigned char* buffer, size_t length) const
+ {
++ if (!length)
++ return;
+ // First, make sure we have enough blob to satisfy the requested stream length.
+- size_t length_available = m_size - tell();
++ const size_t pos = tell();
++ if (pos > m_size)
++ throw zip_error("Stream is seeked past end. No data available");
++ const size_t length_available = m_size - pos;
+ if (length_available < length)
+ throw zip_error("There is not enough stream left to fill requested length.");
+
More information about the Libreoffice-commits
mailing list