Kaydet (Commit) 4fc8d147 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

external/libvisio: -fsanitize=float-divide-by-zero

...when running CppunitTest_writerperfect_draw

Change-Id: I074512f56ebb7eb054c79946c576516036bebbea
üst c4ff0a78
......@@ -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:
--- 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)
{
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment