summaryrefslogtreecommitdiff
path: root/emfio/source/reader/wmfreader.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'emfio/source/reader/wmfreader.cxx')
-rw-r--r--emfio/source/reader/wmfreader.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index a070d8cfbea3..7249b61017ff 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -22,6 +22,7 @@
#include <memory>
#include <o3tl/optional.hxx>
+#include <o3tl/safeint.hxx>
#include <rtl/crc.h>
#include <rtl/tencinfo.h>
#include <sal/log.hxx>
@@ -590,7 +591,7 @@ namespace emfio
auto nMaxStreamPos = nRecordPos + nRecSize;
auto nRemainingSize = std::min(mpInputStream->remainingSize(), nMaxStreamPos - mpInputStream->Tell());
- if (nRemainingSize < static_cast<sal_uInt32>(nOriginalBlockLen))
+ if (nRemainingSize < o3tl::make_unsigned(nOriginalBlockLen))
{
SAL_WARN("vcl.wmf", "exttextout record claimed more data than the stream can provide");
nOriginalTextLen = nOriginalBlockLen = nRemainingSize;