Files
loongoffice/external/libvisio/ubsan.patch
Stephan Bergmann 4fc8d14751 external/libvisio: -fsanitize=float-divide-by-zero
...when running CppunitTest_writerperfect_draw

Change-Id: I074512f56ebb7eb054c79946c576516036bebbea
2015-01-13 11:21:04 +01:00

16 lines
391 B
Diff

--- 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)
{