external/libvisio: Avoid undefined behavior

Change-Id: Ia86ebe7cd48de3f42dd95a11be7926f1e83d9113
This commit is contained in:
Stephan Bergmann 2015-12-27 21:18:30 +01:00
parent 932c74e38c
commit 60a51eaf48

View File

@ -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;