From 60a51eaf486d53491c1ce8723e3f5fb901b66515 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 27 Dec 2015 21:18:30 +0100 Subject: [PATCH] external/libvisio: Avoid undefined behavior Change-Id: Ia86ebe7cd48de3f42dd95a11be7926f1e83d9113 --- external/libvisio/ubsan.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/external/libvisio/ubsan.patch b/external/libvisio/ubsan.patch index d80f7ebe5bbe..ec67b5c9cd4a 100644 --- a/external/libvisio/ubsan.patch +++ b/external/libvisio/ubsan.patch @@ -1,5 +1,14 @@ --- src/lib/VSDContentCollector.cpp +++ src/lib/VSDContentCollector.cpp +@@ -3220,7 +3220,7 @@ + } + if (U_SUCCESS(status) && conv) + { +- const char *src = (const char *)&characters[0]; ++ const char *src = (const char *)characters.data(); + const char *srcLimit = (const char *)src + characters.size(); + while (src < srcLimit) + { @@ -3285,6 +3285,7 @@ _handleLevelChange(level); librevenge::RVNGString text;