[Libreoffice-commits] core.git: external/libvisio

Stephan Bergmann sbergman at redhat.com
Tue Jan 13 02:21:31 PST 2015


 external/libvisio/UnpackedTarball_libvisio.mk |    3 +++
 external/libvisio/ubsan.patch                 |   15 +++++++++++++++
 2 files changed, 18 insertions(+)

New commits:
commit 4fc8d14751879c7837e38dd1d626e1bc3870e03d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 13 11:19:53 2015 +0100

    external/libvisio: -fsanitize=float-divide-by-zero
    
    ...when running CppunitTest_writerperfect_draw
    
    Change-Id: I074512f56ebb7eb054c79946c576516036bebbea

diff --git a/external/libvisio/UnpackedTarball_libvisio.mk b/external/libvisio/UnpackedTarball_libvisio.mk
index 3190833..caae903 100644
--- a/external/libvisio/UnpackedTarball_libvisio.mk
+++ b/external/libvisio/UnpackedTarball_libvisio.mk
@@ -11,8 +11,11 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libvisio))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,libvisio,$(VISIO_TARBALL)))
 
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libvisio,0))
+
 $(eval $(call gb_UnpackedTarball_add_patches,libvisio,\
        external/libvisio/vsd-msvc-max.patch.1 \
+       external/libvisio/ubsan.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libvisio/ubsan.patch b/external/libvisio/ubsan.patch
new file mode 100644
index 0000000..16b0ec4
--- /dev/null
+++ b/external/libvisio/ubsan.patch
@@ -0,0 +1,15 @@
+--- src/lib/VSDParser.cpp
++++ src/lib/VSDParser.cpp
+@@ -1104,7 +1104,11 @@
+   input->seek(1, librevenge::RVNG_SEEK_CUR);
+   double scale = readDouble(input);
+   input->seek(1, librevenge::RVNG_SEEK_CUR);
+-  scale /= readDouble(input);
++  double scaleDenom = readDouble(input);
++  if (scaleDenom != 0)
++  {
++    scale /= scaleDenom;
++  }
+ 
+   if (m_isStencilStarted && m_currentStencil)
+   {


More information about the Libreoffice-commits mailing list