summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/VSDMetaData.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/VSDMetaData.cpp b/src/lib/VSDMetaData.cpp
index a7bcb4d..1652193 100644
--- a/src/lib/VSDMetaData.cpp
+++ b/src/lib/VSDMetaData.cpp
@@ -238,6 +238,8 @@ void libvisio::VSDMetaData::readTypedPropertyValue(librevenge::RVNGInputStream *
librevenge::RVNGString libvisio::VSDMetaData::readCodePageString(librevenge::RVNGInputStream *input)
{
uint32_t size = readU32(input);
+ if (size > getRemainingLength(input))
+ size = getRemainingLength(input);
if (size == 0)
return librevenge::RVNGString();