diff options
author | David Tardon <dtardon@redhat.com> | 2017-10-21 12:27:35 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2017-10-21 14:01:25 +0200 |
commit | ef52a208b720a6f6e3c748ab51ee19c859e9e186 (patch) | |
tree | b02adeb424c37a3703f8531137abb3e90ef09c5d | |
parent | 99e5b63aae2e154be920edd789a4a2236af10c92 (diff) |
cid#1256666 sanitize loop bound
Change-Id: Ib853772be55563f2ccd548f866ec299d7b906d6a
-rw-r--r-- | src/lib/VSDMetaData.cpp | 2 |
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(); |