summaryrefslogtreecommitdiff
path: root/external/libvisio/ubsan.patch
diff options
context:
space:
mode:
Diffstat (limited to 'external/libvisio/ubsan.patch')
-rw-r--r--external/libvisio/ubsan.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/external/libvisio/ubsan.patch b/external/libvisio/ubsan.patch
new file mode 100644
index 000000000000..16b0ec4bf71a
--- /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)
+ {