external/libvisio/UnpackedTarball_libvisio.mk | 4 ++++ external/libvisio/ubsan.patch | 10 ++++++++++ 2 files changed, 14 insertions(+)
New commits: commit 171393c7a497690b3c2a8614a6250ca9e3bf676d Author: Stephan Bergmann <[email protected]> Date: Thu Dec 24 12:26:29 2015 +0100 external/libvisio: Avoid undefined behavior Change-Id: I454cf3b102986f2e3c1905f5fe0e1b2bb427828e diff --git a/external/libvisio/UnpackedTarball_libvisio.mk b/external/libvisio/UnpackedTarball_libvisio.mk index f9467c5..aa8b48f 100644 --- a/external/libvisio/UnpackedTarball_libvisio.mk +++ b/external/libvisio/UnpackedTarball_libvisio.mk @@ -13,6 +13,10 @@ $(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/ubsan.patch \ +)) + ifeq ($(COM_IS_CLANG),TRUE) ifneq ($(filter -fsanitize=%,$(CC)),) $(eval $(call gb_UnpackedTarball_add_patches,libvisio, \ diff --git a/external/libvisio/ubsan.patch b/external/libvisio/ubsan.patch new file mode 100644 index 0000000..d80f7eb --- /dev/null +++ b/external/libvisio/ubsan.patch @@ -0,0 +1,10 @@ +--- src/lib/VSDContentCollector.cpp ++++ src/lib/VSDContentCollector.cpp +@@ -3285,6 +3285,7 @@ + _handleLevelChange(level); + librevenge::RVNGString text; + std::vector<unsigned char> tmpData(layerMem.m_data.size()); ++ if (!layerMem.m_data.empty()) + memcpy(&tmpData[0], layerMem.m_data.getDataBuffer(), layerMem.m_data.size()); + appendCharacters(text, tmpData, layerMem.m_format); + _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
